Skip to main content

Crate ferrocad_theme

Crate ferrocad_theme 

Source
Expand description

The visual-language token table (V0 of docs/interaction/visual-language.md).

Two representations, one namesake:

  • draw — linear RGBA, the renderer’s draw contract;
  • ui — packed sRGB (0xRRGGBBAA), what gpui binds.

The navigation cube’s palette is the third table, navicube: moved here as-is, mostly sRGB-normalised [f32; 4], not yet normalised onto either representation (docs/interaction/visual-language.md §1.6, V0b).

A token is a constant here, never a literal at a call site. The tests keep the two representations in step, and linear_from_srgb_hex / srgb_hex_from_linear are the round trip between them.

The crate is a leaf: no gpui, no wgpu, no kernel. Every GUI crate in the workspace can depend on it without inverting the graph.

Re-exports§

pub use draw::linear_from_srgb_hex;
pub use draw::srgb_hex_from_linear;

Modules§

draw
The tokens at the draw contract: linear RGBA for the renderer.
navicube
The navigation cube’s raw palette: the built colours its role layer maps onto.
ui
The tokens at the gpui boundary: packed sRGB.