Skip to main content
Glama

Zovo Palette Lab

Check color contrast

check_color_contrast
Read-onlyIdempotent

Use this when the user wants to know whether a text, icon or border colour has enough contrast against a background: a WCAG contrast checker for one colour pair (e.g. "does white text on #F59E0B pass WCAG AA", "contrast ratio of #767676 on white", "what text color for this background"). Returns the computed WCAG 2.x ratio (truncated to 2 decimals, rounded down), AA/AAA results for normal text, large text and UI components, a verdict for a given font size, APCA Lc as draft information, and the nearest passing colours for AA and AAA (darker and lighter, same OKLCH hue and chroma). Accepts hex, 8-digit hex with alpha, rgb(), hsl(), hwb(), lab(), lch(), oklab(), oklch(), color(display-p3 ...) and CSS colour names; wide-gamut colours are clipped to sRGB with a note. Does not read colours from images or web pages, resolve CSS variables or currentColor, or check gradients as a whole (check each stop). For 3 or more colours use check_palette_contrast.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
boldNoOptional: true when that text is bold (font-weight 700+), e.g. true. Bold text from 18.66px counts as large text.
adjustNoWhich colour the suggested fixes change, e.g. foreground. auto (default) changes the more colourful of the two, so brand colours keep their hue.
backgroundYesBackground colour behind it, e.g. #FFFFFF, white or #1E293B. A translucent background is composited over white.
foregroundYesText, icon or border colour, e.g. #767676, #1E6FD980 (8-digit hex with alpha), rgb(118, 118, 118), hsl(214 76% 48%), oklch(55% 0.18 255) or a CSS colour name such as navy. Translucent colours are composited over the background.
font_size_pxNoOptional text size in CSS pixels for a single verdict on that text, e.g. 16. 18pt = 24px; 14pt = about 18.66px.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
apcaYes
kindYes
wcagYes
fixesYes
ratioYes
requestYes
warningsYes
ratio_4dpYes
your_textYes
backgroundYes
foregroundYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources