|
CGVIS Utils
|
Color space conversion helpers among RGB/HSV/HSL/CMY/CMYK/YUV. More...
Go to the source code of this file.
Namespaces | |
| namespace | ColorConversion |
Functions | |
| template<typename T> | |
| Vec3t< T > | ColorConversion::rgbToHsv (const Vec3t< T > &other) |
| Convert linear RGB to HSV. | |
| template<typename T> | |
| Vec3t< T > | ColorConversion::hsvToRgb (const Vec3t< T > &other) |
| Convert HSV to linear RGB. | |
| template<typename T> | |
| Vec3t< T > | ColorConversion::hslToHsv (const Vec3t< T > &other) |
| Convert HSL to HSV. | |
| template<typename T> | |
| Vec3t< T > | ColorConversion::hsvToHsl (const Vec3t< T > &other) |
| Convert HSV to HSL. | |
| template<typename T> | |
| Vec3t< T > | ColorConversion::rgbToCmy (const Vec3t< T > &other) |
| Convert RGB to CMY. | |
| template<typename T> | |
| Vec4t< T > | ColorConversion::rgbToCmyk (const Vec3t< T > &other) |
| Convert RGB to CMYK. | |
| template<typename T> | |
| Vec3t< T > | ColorConversion::cmyToRgb (const Vec3t< T > &other) |
| Convert CMY to RGB. | |
| template<typename T> | |
| Vec3t< T > | ColorConversion::cmykToRgb (const Vec4 &other) |
| Convert CMYK to RGB. | |
| template<typename T> | |
| Vec3t< T > | ColorConversion::rgbToYuv (const Vec3t< T > &other) |
| Convert RGB to a simple YUV (luma/chroma) space via a linear matrix. | |
| template<typename T> | |
| Vec3t< T > | ColorConversion::yuvToRgb (const Vec3t< T > &other) |
| Convert the simple YUV (above) back to RGB. | |
Color space conversion helpers among RGB/HSV/HSL/CMY/CMYK/YUV.
Header‑only collection of small, templated utilities for converting colors between common color spaces. The functions are written for generic scalar component types (e.g., float, double) and operate on the project's vector and matrix types (Vec3t/Vec4t/Mat4t).
Unless stated otherwise, inputs are expected in the following ranges: