Module style::color::convert

source ·
Expand description

cbindgen:ignore Color conversion algorithms.

Algorithms, matrices and constants are from the [color-4] specification, unless otherwise specified:

https://drafts.csswg.org/css-color-4/#color-conversion-code

NOTE: Matrices has to be transposed from the examples in the spec for use with the euclid library.

Structs§

  • The a98-rgb color space. https://drafts.csswg.org/css-color-4/#predefined-a98-rgb
  • The Display-P3 color space. https://drafts.csswg.org/css-color-4/#predefined-display-p3
  • Color specified with hue, saturation and lightness components.
  • Color specified with hue, whiteness and blackness components.
  • The Lab color space. https://drafts.csswg.org/css-color-4/#specifying-lab-lch
  • The Lch color space. https://drafts.csswg.org/css-color-4/#specifying-lab-lch
  • The Oklab color space. https://drafts.csswg.org/css-color-4/#specifying-oklab-oklch
  • The Oklch color space. https://drafts.csswg.org/css-color-4/#specifying-oklab-oklch
  • The ProPhoto RGB color space. https://drafts.csswg.org/css-color-4/#predefined-prophoto-rgb
  • The Rec.2020 color space. https://drafts.csswg.org/css-color-4/#predefined-rec2020
  • The sRGB color space. https://drafts.csswg.org/css-color-4/#predefined-sRGB
  • The same as sRGB color space, except the transfer function is linear light. https://drafts.csswg.org/css-color-4/#predefined-sRGB-linear
  • A color in the XYZ coordinate space with a D50 white reference. https://drafts.csswg.org/css-color-4/#predefined-xyz
  • A color in the XYZ coordinate space with a D65 white reference. https://drafts.csswg.org/css-color-4/#predefined-xyz

Enums§

  • A reference white that is used during color conversion.

Traits§

  • A trait that allows conversion of color spaces to and from XYZ coordinate space with a specified white point.

Functions§

Type Aliases§