--- title: "General Color Math Shaders" url: "https://help.maxon.net/r3d/cinema/en-us/Content/html/General%2BColor%2BMath%2BShaders.html" section_path: "Shaders > Color Shaders > General Color Math Shaders" description: "Redshift supports a sub-set of math shaders that can also operate on RGBA color components. These simple shaders are all listed here." --- # General Color Math Shaders You are here: # General Color Math Shaders ## Introduction Redshift supports a sub-set of math shaders that can also operate on RGBA color components. These simple shaders are all listed here. > **Note:** Color addition, multiplication or subtraction can also be found in the more comprehensive [Color Composite](https://help.maxon.net/r3d/cinema/en-us/Content/html/Color%2BComposite.html.md) and [Color Layer](https://help.maxon.net/r3d/cinema/en-us/Content/html/Color%2BLayer.html.md) shaders. ## Color Abs ![Image: image2017-10-5_12-52-378cc4.png](https://help.maxon.net/r3d/cinema/en-us/Content/Resources/Images/image2017-10-5_12-52-378cc4.png) Returns the absolute value of *Input*. For example, a value of -1.0 will be returned as 1.0. ## Color Bias Returns a curved bias of *Input* by *Bias*, using the following Ken Perlin formula: pow(*Input*, log(*Bias*)/log(0.5)) ## Color Change Range ![Image: image2017-10-5_12-53-40d5ad.png](https://help.maxon.net/r3d/cinema/en-us/Content/Resources/Images/image2017-10-5_12-53-40d5ad.png) Returns *Input* remapped from *Old Range* values to *New Range* values, with an optional clamp to the new range. ## Color Exp ![Image: image2017-10-5_12-53-58c916.png](https://help.maxon.net/r3d/cinema/en-us/Content/Resources/Images/image2017-10-5_12-53-58c916.png) Returns the exponential of *Input*, using the following formula: e^*Input*. ## Color Gain ![Image: image2017-10-5_12-54-1658d1.png](https://help.maxon.net/r3d/cinema/en-us/Content/Resources/Images/image2017-10-5_12-54-1658d1.png) Returns a contrast gain of Input by Gain, using the following Ken Perlin formula: Bias( 2 \* *Input*, 1 - *Gain* ) \* 0.5 ;                  if *Input* \< 0.5 1 - Bias( 2 - 2 \* *Input*, 1 - *Gain* ) \* 0.5 ;       otherwise ## Color Invert ![Image: image2017-10-5_12-54-3457a6.png](https://help.maxon.net/r3d/cinema/en-us/Content/Resources/Images/image2017-10-5_12-54-3457a6.png) Returns 1 - *Input*. ## Color Mix ![Image: image2017-10-5_12-54-588eb5.png](https://help.maxon.net/r3d/cinema/en-us/Content/Resources/Images/image2017-10-5_12-54-588eb5.png) Returns *Input 1* linearly interpolated to *Input 2* by *Mix*. When *Mix* is 0.0, *Input 1* will be returned. When *Mix* is 1.0, *Input 2* will be returned. ## Color Saturate ![Image: image2017-10-5_12-55-33bade.png](https://help.maxon.net/r3d/cinema/en-us/Content/Resources/Images/image2017-10-5_12-55-33bade.png) Returns *Input* clamped to values between 0 and 1, inclusively. For example -1.5 will be returned as 0.0 and 1.5 will be returned as 1.0. ## Color Splitter ![Image: image2017-10-5_12-55-480242.png](https://help.maxon.net/r3d/cinema/en-us/Content/Resources/Images/image2017-10-5_12-55-480242.png) Returns each component of the *Input* color separately, like so: *outR* = *Input*.r *outG* = *Input*.g *outB* = *Input*.b *outA* = *Input*.a ## Color Sub ![Image: image2017-10-5_12-56-1050ff.png](https://help.maxon.net/r3d/cinema/en-us/Content/Resources/Images/image2017-10-5_12-56-1050ff.png) Returns *Input 1* - *Input 2*.