contrast_check
WCAG contrast ratio between a foreground and background color, for accessibility. Both accept a hex, CSS name, RNV brand name, or saved-palette reference. Returns the ratio (1.0-21.0) plus pass/fail for AA and AAA at normal and large text sizes and for UI components. Read-only and deterministic, with no side effects. Use this for legibility and accessibility checks; to measure raw perceptual difference between two colors rather than readability use color_difference instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| background | Yes | ||
| foreground | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||