import { STATE_LAYER_OPACITY, Tone } from '../tokens'; /** The resolved colours of one tone (see {@link Tone}). */ export interface TonePalette { /** The tone's main colour — fills, tracks and indicators. */ main: string; /** * The tone as text, glyphs and lines on the page surface: `main` when it * reads at {@link INK_CONTRAST}:1 against the card surface, else whichever * of the tone's `dark`/`light` shades reads better. A fill-only brand * colour (a lime, a pale yellow) stays legible this way. */ ink: string; /** Text/glyph colour on a `main` fill. */ contrast: string; /** A soft tinted surface of the tone. */ container: string; /** Text/glyph colour on `container`. */ onContainer: string; } /** Resolved colours every themed component shares. */ export interface Tones { /** Whether the active palette is the dark one. */ isDark: boolean; /** Hairline outline of controls and cards. */ outline: string; /** Emphasised outline (outlined buttons, focused fields). */ outlineStrong: string; /** Soft fill of tracks, skeletons and inactive segments. */ fill: string; /** Stronger fill (hovered rows, chip surfaces). */ fillStrong: string; /** Divider lines. */ divider: string; /** Overlay scrim. */ backdrop: string; /** Placeholder text. */ placeholder: string; /** A state layer of `color` at the hover or pressed alpha. */ stateLayer: (color: string, level: keyof typeof STATE_LAYER_OPACITY) => string; /** The palette of a tone. */ tone: (tone: Tone) => TonePalette; /** Resolves a theme token (or passes a literal colour through). */ resolve: (token: string) => string; } /** * Resolves the neutral and tonal colours the themed components are built * from. Neutrals derive from the text colour at an alpha, so they read * correctly on light and dark surfaces alike — the palette's `neutral` scale * is not inverted for dark themes and must not be used for them. * * @example * ```tsx * const tones = useTones(); * * ``` * * @public */ /** Minimum contrast of a tone's `ink` against the card surface (WCAG AA text). */ export declare const INK_CONTRAST = 4.5; declare const useTones: () => Tones; export default useTones; //# sourceMappingURL=useTones.d.ts.map