Set color values for two other channels to 0. Note that it's something entirely different than ImageConvertToChannelTo1st: here we preserve original channel values, and remove values on two other channels.
Converting between RGB and HSV. For HSV, we keep components as floating-point values, with hue in 0..6 range, saturation and value in 0..1. For RGB, one version keeps components as bytes (0..255 range), and the other as floating-point values (0..1 range).
Given two colors in RGB, interpolate them in HSV space.
function ColorToHex(const V: TCastleColor): string;
Change color into a hexadecimal notation of it (like in HTML). This color includes an alpha channel (as 4th component), and so the output contains the alpha value at the end (so it's 8 hex digits), unless alpha is opaque in which case it's not written (and result is 6 hex digits).
Change color into a hexadecimal notation of it (like in HTML). This color has no alpha channel, so it's always 6 hex digits.
function HexToColor(const S: string): TCastleColor;
Convert hexadecimal color notation (like in HTML) into an RGBA color. Handles 8 or 6 digit color (RGB or RGBA with 2 letters per component; for 6 digits, alpha is assumed to be 1.0 (opaque)).
Convert hexadecimal color notation (like in HTML) into an RGB color. Handles 8 or 6 digit color (RGB or RGBA with 2 letters per component; for 8 digits, alpha is ignored).