コントラスト比を計算
contrast_ratioCalculates the contrast ratio between two colors and returns WCAG 2.x AA/AAA pass/fail results for normal text, large text, and non-text UI components without using a browser.
Instructions
2 色のコントラスト比を計算し、WCAG 2.x の AA / AAA について通常の文字・大きな文字・UI 部品(非テキスト)ごとの合否を返す。ブラウザは使わない
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": "contrast_ratio"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bold | No | 太字(700 以上)か | |
| background | Yes | 背景色(#hex / rgb() / rgba()) | |
| foreground | Yes | 文字色(#hex / rgb() / rgba()) | |
| font_size_px | No | 文字サイズ(px)。指定すると該当する判定を強調 |