check_color_contrast
Validate color contrast ratios between foreground and background to ensure compliance with WCAG accessibility standards, supporting various color formats and font attributes.
Instructions
Check if a foreground and background color combination meets WCAG contrast requirements
Input Schema
Name | Required | Description | Default |
---|---|---|---|
background | Yes | Background color in various formats (e.g., "#FFFFFF", "#FFF", "rgb(255,255,255)", "hsv(0,0%,100%)") | |
fontSize | No | Font size in pixels | |
foreground | Yes | Foreground color in various formats (e.g., "#000000", "#000", "rgb(0,0,0)", "hsv(0,0%,0%)") | |
isBold | No | Whether the text is bold |
Input Schema (JSON Schema)
{
"properties": {
"background": {
"description": "Background color in various formats (e.g., \"#FFFFFF\", \"#FFF\", \"rgb(255,255,255)\", \"hsv(0,0%,100%)\")",
"type": "string"
},
"fontSize": {
"default": 16,
"description": "Font size in pixels",
"type": "number"
},
"foreground": {
"description": "Foreground color in various formats (e.g., \"#000000\", \"#000\", \"rgb(0,0,0)\", \"hsv(0,0%,0%)\")",
"type": "string"
},
"isBold": {
"default": false,
"description": "Whether the text is bold",
"type": "boolean"
}
},
"required": [
"foreground",
"background"
],
"type": "object"
}