Clamping color

I have a vector parameter that changes a dynamic material color based on collision with an object. It’s currently setup so that RGB channels subtract .03 each time. It works for the most part but it gets to a point where the material goes completely black. I’d like to clamp it so that it doesn’t go that far. I thought maybe a map range clamped would work, but not sure how to set it up properly. When I try to use it it just defaults to that value immediately and ignores the float - float values I have before it.

Map range node serves a different purpose - it’s more of a translating node with an optional clamp. Depending on how you want to clamp it:

Either the entire vector / color so you can end up with .09 as a total value:

R: .09
G: .00
B: .00

or individual channels separately, where 0.03 is min:

R: .03
G: .03
B: .03

Really depends on how it’s supposed to clamp.

Check if one of the values is less than your threshold value, and if it is, just don’t subtract anymore.

Works great! Thank you. You rock!