suggest_accessible_color
Suggest a WCAG-compliant color by adjusting lightness while preserving hue and saturation to meet a target contrast ratio against a given background or foreground.
Instructions
Suggest a replacement color that meets a WCAG contrast target. Adjusts lightness while preserving hue and saturation to stay as close to the original as possible.
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": {
"foreground": "<foreground>",
"background": "<background>"
},
"name": "suggest_accessible_color"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fix | No | Which color to adjust (default: foreground) | foreground |
| background | Yes | Background color | |
| foreground | Yes | Foreground color | |
| target_level | No | WCAG target level (default: AA) | AA |