Type of the color components.
The color space specified.
The color type from the HSx family.
// HSL color with float components alias HSLf = HSx!(HSxType.HSL, float); HSLf c = HSLf(3.1415, 1, 0.5); // test HSL operators and functions static assert(HSLf(3.1415, 0.2, 0.5) + HSLf(0, 0.5, 0.5) == HSLf(3.1415, 0.7, 1)); static assert(HSLf(2, 0.5, 1) * 100.0 == HSLf(200, 50, 100));
// HSV color with float components alias HSVf = HSx!(HSxType.HSV, float); HSVf c = HSVf(3.1415, 1, 0.5); // test HSV operators and functions static assert(HSVf(3.1415, 0.2, 0.5) + HSVf(0, 0.5, 0.5) == HSVf(3.1415, 0.7, 1)); static assert(HSVf(2, 0.5, 1) * 100.0 == HSVf(200, 50, 100));
// HSI color with float components alias HSIf = HSx!(HSxType.HSI, float); HSIf c = HSIf(3.1415, 1, 0.5); // test HSI operators and functions static assert(HSIf(3.1415, 0.2, 0.5) + HSIf(0, 0.5, 0.5) == HSIf(3.1415, 0.7, 1)); static assert(HSIf(2, 0.5, 1) * 100.0 == HSIf(200, 50, 100));
// HCY color with float components alias HCYf = HSx!(HSxType.HCY, float); HCYf c = HCYf(3.1415, 1, 0.5); // test HCY operators and functions static assert(HCYf(3.1415, 0.2, 0.5) + HCYf(0, 0.5, 0.5) == HCYf(3.1415, 0.7, 1)); static assert(HCYf(2, 0.5, 1) * 100.0 == HCYf(200, 50, 100));
HSx color space is used to describe a suite of angular color spaces including HSL, HSV, HSI, HSY.