Skip to main content

gpui_kit_material_color/
lib.rs

1//! Color for gpui-kit-material, independent of GPUI.
2//!
3//! - [`Color`]: an sRGB RGBA value with the blend the kit uses for state
4//!   layers, containers and animated palette changes.
5//! - [`palette`]: the built-in source palettes and the serializable
6//!   light/dark [`ThemePreferences`].
7//! - [`scheme`]: the semantic [`ColorRole`]s components paint with, and the
8//!   derivation of a [`Scheme`] from a palette.
9//! - [`themes`]: the 20 md3.io reference presets, with explicit light/dark mode
10//!   and standard/medium/high contrast. Values come from the reference CSS;
11//!   these tables do not implement dynamic seed-color generation.
12//! - [`dynamic`]: Material's dynamic color, ported from
13//!   material-color-utilities: HCT, tonal palettes and seed schemes.
14//!
15//! Keeping this crate free of GPUI lets the scheme rules be tested on their
16//! own.
17mod color;
18pub mod dynamic;
19pub mod palette;
20pub mod scheme;
21pub mod themes;
22
23pub use color::Color;
24pub use palette::{Appearance, Palette, PaletteId, ThemePreferences};
25pub use scheme::{ColorRole, Scheme};