Module color.hsv
HSV color values and conversion to and from encoded sRGB.
HSV is provided for interoperability, color-pickers, and tools that express
color by hue, saturation, and value/brightness. It is not a perceptual
replacement for Oklab or OKLCH. Hue is stored in degrees; conversion
normalizes complete revolutions and canonicalizes achromatic colors to hue 0.
Functions
| Name | Description |
toHsv(color)
|
Converts encoded sRGB to HSV.
|
toSRgb(color)
|
Converts HSV to encoded sRGB without clipping or gamut mapping.
|
Structs
| Name | Description |
Hsv
|
HSV values with hue in degrees and saturation/value as ratios.
|
Aliases
| Name | Type | Description |
Hsvd
|
Hsv!(double)
|
HSV with double components.
|
Hsvf
|
Hsv!(float)
|
HSV with float components.
|