Find the token for a hard-coded value
find_token_for_valueRetrieve design tokens for a hard-coded color or dimension: exact semantic matches first, then nearest perceptual ones, to replace literals with tokens.
Instructions
Given a hard-coded value (#1a73e8, rgb(...), 16px, 1rem), return the tokens that carry it: exact matches first (semantic before primitive), then the perceptually nearest colors or nearest dimensions. Use it whenever code or a design contains a literal value, to replace it with a token.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Color mode, for example light or dark | |
| type | No | Inferred from the value when omitted | |
| brand | No | Brand name, for example aurora or nord | |
| limit | No | ||
| value | Yes | A hard-coded value, for example #1a73e8, rgb(26 115 232), 16px or 1rem | |
| property | No | CSS property where the value is used (padding, color, border-radius...). Ranks tokens by intent |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | ||
| exact | Yes | ||
| value | Yes | ||
| nearest | Yes | ||
| normalized | Yes | Canonical form of the input used for comparison | |
| recommendation | Yes |