tokenForegroundForIntent
Commons
stable
Resolve the foreground-only CSS token for an intent — the "coloured text on a light surface" rung (fgSubtle). Distinct from tokenStylesForIntent which returns the WCAG-contrasted text placed ON a coloured surface.
API
Signature
Full TypeScript signature sourced from the util file.
API
Parameters
Input parameters accepted by this util.
- intentrequiredTIntent
- One of the semantic intent values: "primary", "secondary", "ghost", "success", "warning", "danger", "info", "neutral". Each maps to a different `fgSubtle` token rung.
API
Return value
The value returned by this util.
- A `var(--origam-color__…---fgSubtle)` CSS custom-property reference, ready to bind as a `color` style value.
Usage
Examples
Ready-to-paste usage snippets.
Colour inline text by intent