function: color color_add( color color1, color color2 )
Adds two colors
function: color color_sub( color color1, color color2 )
Subtracts two colors
function: color color_mul( color color1, color color2 )
Multiplies two colors component-wise, dividing RGB color components by 255 afterwards
function: color color_div( color color1, color color2 )
Divides two colors
function: color color_mod( color color1, color color2 )
Generates a component-wise modulo from two colors
function: color color_pow( color color1, color color2 )
Raises each component to the power of the other color's respective component. Sign is preserved, RGB components are normalized before operation and restored afterwards
function: color color_lerp( color color1, color color2, float q )
Component-wise linear interpolation; see function: lerp (above)
function: color color_shift( color color1, color color2 )
Component-wise color value shift. RGB values are wrapped around, alpha is clamped
function: color color_rgb_value_shift( color color1, float val )
RGB value (average) shift. Average is wrapped around and difference is applied to RGB components
function: color color_rgb_value_invert( color color1, float scale )
RGB value (average) inversion. The factor to add to each of the RGB components is multiplied by `scale`
function: color color_soft_contrast( color color1, float val )
Smoothstep + Lerp between old and new value for each component (RGB components are normalized)
function: color color_cut_contrast( color color1, float val )
Depending on relation to half-range (128 for RGB, 0.5 for alpha), distance to closest side of range is 2x downscaled; lerp is applied between old and new values.