Suggest a passing color
suggest_contrast_fixFind the nearest foreground or background color adjustment to meet WCAG contrast thresholds, returning a calculated candidate for manual application.
Instructions
Find the nearest black-or-white-directed foreground or background adjustment that reaches the selected WCAG contrast threshold. Returns a mathematical candidate, not an automatic edit.
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_contrast_fix"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| level | No | AA | |
| adjust | No | foreground | |
| background | Yes | Background CSS sRGB color such as white, #ffffff, rgb(), hsl(), or color(srgb ...). | |
| fontSizePx | No | ||
| fontWeight | No | ||
| foreground | Yes | Foreground CSS sRGB color such as white, #767676, rgb(), hsl(), or color(srgb ...). |