RGBA Color.
typedef struct Color
Red.
float r;
Green.
float g;
Blue.
float b;
Alpha.
float a;
End block 'Color'
} Color;
Get luminence.
API float ColorGetLume(Color color);
color:
returns: Luminance
Construct color that is the sum of input colors.
API Color ColorAdd(Color a, Color b);
a: First color.
b: Second color
returns: Sum of colors.
Construct color that is the difference of input colors.
API Color ColorSub(Color a, Color b);
a: First color.
b: Second color
returns: Difference of colors.
Construct color that is the product of input colors.
API Color ColorMul(Color a, Color b);
a: First color.
b: Second color
returns: Product of colors.
Construct color that is the division of input colors.
API Color ColorDiv(Color a, Color b);
a: First color.
b: Second color
returns: Division of colors.
Convert color to monochrome.
API void ColorMono(Color *color);
color: Color.
Normalize color.
API void ColorNorm(Color *color);
color: Color.
Set RGB values.
API void ColorSetRGB(Color *color, float r, float g, float b);
color: Color.
r: Red component.
g: Green component.
b: Blue component.
Set RGB values to single value.
API void ColorSetMono(Color *color, float value);
color: Color.
value: Element value.
Set alpha value.
API void ColorSetAlpha(Color *color, float a);
color: Color.
a: Alpha.
Construct color.
API Color ColorMake(float r, float g, float b, float a);
r: Red color component.
g: Green color component.
b: Blue color component.
a: Alpha color component.
returns: Color.