Skip to main content

Crate gpui_kit_material_color

Crate gpui_kit_material_color 

Source
Expand description

Color for gpui-kit-material, independent of GPUI.

  • Color: an sRGB RGBA value with the blend the kit uses for state layers, containers and animated palette changes.
  • palette: the built-in source palettes and the serializable light/dark ThemePreferences.
  • scheme: the semantic ColorRoles components paint with, and the derivation of a Scheme from a palette.
  • themes: the 20 md3.io reference presets, with explicit light/dark mode and standard/medium/high contrast. Values come from the reference CSS; these tables do not implement dynamic seed-color generation.

Keeping this crate free of GPUI lets the scheme rules be tested on their own, and leaves room for Material’s dynamic color (HCT tonal palettes) to arrive here without touching components.

Re-exports§

pub use palette::Appearance;
pub use palette::Palette;
pub use palette::PaletteId;
pub use palette::ThemePreferences;
pub use scheme::ColorRole;
pub use scheme::Scheme;

Modules§

palette
Built-in source palettes and the independent light/dark preference. Upstream colors and adaptations are recorded in PALETTES.md; their licenses are in licenses/.
scheme
Semantic color roles and their derivation from a source palette.
themes
Exact preset colors, including medium/high contrast overrides.

Structs§

Color
An sRGB color with straight alpha, each channel in 0.0..=1.0.