Skip to content

Search the guides, deployment pages, and API reference.

color

import { color } from "@pitlane/theme/schema";
function color(): TokenSchema<"color">;

A color token. Accepts any CSS color, including light-dark(), color-mix(), and currentColor, plus DTCG's structured form.

Returns

TokenSchema<"color">

A schema declaring the color token type

Example

let schema = { color: s.color() };
let tokens = { color: { white: "#fff", page: lightDark("#fff", "#111") } };