check_contrast
算两个颜色之间的 WCAG 对比度,并同时给出正文级(4.5 / 7)与大字级(3 / 4.5)两套判定。适合在把配色写进代码前先验一遍。
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": "check_contrast"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| background | Yes | 背景色,如 #ffffff | |
| foreground | Yes | 前景色(通常是文字),如 #111827 |