Dark mode palette
dark_mode_paletteDerive a dark counterpart from light-mode tokens. Pass tokens as name: color lines (CSS custom properties work), a JSON object of name to color, or an array of {name, color}. Roles are guessed from the name (surface, raised surface, text, border, accent, on-accent) and then from the color. Surfaces are rebuilt around OKLCH L 0.19 with raised layers stepped lighter; text is mapped to light values under pure white; borders keep their distance from the surface; accents keep hue, gain lightness and lose about 15 percent chroma. Text and accents are nudged until they reach 4.5:1 on the lightest dark surface. Returns the mapping per token with a note, any pairs that still fail with their ratios, and CSS variables. The lifted-surface approach is a convention, not a standard.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"tokens": "<tokens>"
},
"name": "dark_mode_palette"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tokens | Yes | Light tokens: "bg: #fff\ntext: #111\nprimary: #2563eb", a JSON object, or an array of {name, color}. |