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). Note that version it takes 4-component vector and adds the alpha too at the end.
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)).