Crate kasi_kule

source ·
Expand description

kasi-kule is a small rust implementation of the CIECAM02 color space and conversion to it from standard RGB. It is based on the d3-cam02 and colorspacious.

The name, kasi-kule, is a translation of ‘flower’ into toki pona - literally, ‘colorful plant’. o sitelen pona!

Re-exports

  • pub use consts::LCD;
  • pub use consts::SCD;
  • pub use consts::UCS;

Modules

Structs

  • Hunt-Pointer-Estevez space, derived from CAM02 LMS.
  • The CIECAM02 JCh (Lightness, Chroma, Hue) color space, derived from LMS.
  • The CAM02 Jab color appearance model. It can be transformed from JCh space into an approximately perceptually uniform space (UCS), or into a space optimized for either LCD (Large Color Differences) or SCD (Small Color Differences). Subsequent calculations of color difference must be between colors within the same space (UCS/LCD/SCD).
  • Long-Medium-Short color space, derived from XYZ using the Mcat02 matrix.
  • Linearized RGB, scaled from sRGB
  • CIEXYZ 1931 Color space, in the 0-100 range.
  • sRGB color, in the 0-255 range.

Traits

  • the JabSpace defines constants for transformation from JCh space into JabSpace. Used for type-checking comparisons between Jab colors.