Crate hct_cam16

Crate hct_cam16 

Source
Expand description

hct-cam16 — CAM16 + HCT perceptual color math.

This crate provides a small, dependency-free implementation of:

  • CAM16 hue/chroma extraction
  • HCT (Hue–Chroma–Tone) color space
  • sRGB/Linear RGB/XYZ/L* conversions
  • An iterative gamut-mapping solver (Material Design 3 style)

The public API is designed for deterministic u32 ARGB input/output.

Structs§

CorePalette
Core tonal palettes for a Material Design 3 style color scheme
Hct
HCT color - Hue, Chroma, Tone
MaterialColorScheme
A complete color scheme (ARGB values).
TonalPalette
A tonal palette generates colors at different tones (lightness levels) while maintaining the same hue and chroma.
ViewingConditions
CAM16 viewing conditions (standard sRGB viewing conditions)

Constants§

STANDARD_TONES
Standard tones used in Material Design 3