Overview
The `hex` parameter accepts 3-, 6- or 8-digit hex, with or without `#`. Shorthand is expanded (`F53` becomes `FF5533`) and the alpha pair of an 8-digit value is dropped, so transparency has no effect. The echoed `hex` is upper-case with a leading `#`.
`luminance` is WCAG 2.0 relative luminance: each channel is divided by 255, linearised with the sRGB curve (values at or below 0.03928 are divided by 12.92, the rest raised through the 2.4 power), then weighted 0.2126, 0.7152 and 0.0722 for red, green and blue. It runs from 0 for black to 1 for white and is rounded to four decimals. `is_light` is true when black text has at least as much contrast on the color as white text does, which happens at a luminance of about 0.179 and above, and `is_dark` is its opposite. `brightness_category` splits at the same point: dark colors are `very dark` below 0.05, `dark` below 0.1 and `medium-dark` up to the crossover; light colors are `medium-light` below 0.5, `light` below 0.9 and `very light` from 0.9.
`contrast_ratio_with_white` is 1.05 divided by (luminance + 0.05), and `contrast_ratio_with_black` is (luminance + 0.05) divided by 0.05, both rounded to two decimals. The AA flags require 4.5 or more and the AAA flags 7 or more, the thresholds for normal-size text. `recommended_text_color` is `#000000` or `#FFFFFF`, whichever contrast ratio is higher, and always agrees with `is_light`: a mid-tone such as `#808080` (luminance 0.2159) is light, `medium-light`, and gets black text.
`perceived_brightness` is the plain average of the three channels on a 0 to 255 scale, and `yiq` is the weighted sum (299 R + 587 G + 114 B) / 1000. On the Free plan these, `luminance`, the contrast ratios, the WCAG flags and the recommendation are removed.
Live Test Color Brightness Skill Skill →
The tool
Once your client is connected to the VerveKit server, this appears in its tool list as ColorBrightnessSkill. It is read-only and open-world — it fetches and never mutates anything on your side — so most clients call it without asking you to confirm.
{
"name": "ColorBrightnessSkill",
"arguments": {
"hex": "FF5733"
}
}You do not name the tool yourself; the model picks it. Asking about FF5733 in the terms this skill covers is enough for it to reach for ColorBrightnessSkill on its own — naming it explicitly also works, and is the way to force the call.
Connecting
One server URL covers every skill in the catalog, including this one. Authorization is OAuth: the client opens a browser once, and there is no key to paste into a config file.
{
"mcpServers": {
"vervekit": {
"url": "https://api.vervekit.com/v1/mcp"
}
}
}https://api.vervekit.com/v1/mcpPer-client setup — Claude, Cursor, VS Code, ChatGPT — is on the MCP setup page.
Arguments
These are the properties on the tool's inputSchema, so a well-behaved client validates them before the call is made. Premium arguments are accepted on every plan but only take effect on plans that include them.
| Argument | Type | Description |
|---|---|---|
hexRequired | string | Hex color value (with or without # prefix) hexColor |
What the model gets back
The result carries a structuredContent object matching the tool's declared outputSchema, so a client reads fields without parsing prose. status is "ok" and error is null on success; a null field means the value was not available for that input, not that the call failed.
{
"status": "ok",
"error": null,
"data": {
"hex": "#FF5733",
"rgb": {
"r": 255,
"g": 87,
"b": 51
},
"luminance": 0.2832,
"perceived_brightness": 131,
"yiq": 133.13,
"is_light": false,
"is_dark": true,
"brightness_category": "dark",
"recommended_text_color": "#FFFFFF",
"contrast_ratio_with_white": 3.15,
"contrast_ratio_with_black": 6.66,
"wcag_aa_compliant_with_white": false,
"wcag_aa_compliant_with_black": true,
"wcag_aaa_compliant_with_white": false,
"wcag_aaa_compliant_with_black": false
}
}
Response fields
Paths are relative to data. Premium fields are absent rather than zeroed on plans that do not include them, so check for presence instead of comparing to 0.
| Field | Type | Example | Description |
|---|---|---|---|
hex | string | #FF5733 | Hexadecimal color value provided in the request |
rgb | object | {…} | RGB color components: red, green, blue values |
rgb.r | number | 255 | Red component value between 0 and 255 |
rgb.g | number | 87 | Green component value between 0 and 255 |
rgb.b | number | 51 | Blue component value between 0 and 255 |
luminancePremium | number | 0.2832 | Relative luminance calculated using WCAG 2.0 formula |
perceived_brightnessPremium | number | 131 | Perceived brightness score from 0 to 255 |
yiqPremium | number | 133.13 | YIQ color space brightness value for brightness analysis |
is_light | boolean | false | True when black text contrasts better than white on this color (luminance about 0.179 or above) |
is_dark | boolean | true | True when white text contrasts better than black on this color; the opposite of is_light |
brightness_category | string | dark | Brightness classification: very dark, dark, medium-dark, medium-light, light or very light; the dark buckets are exactly the colors that get white text |
recommended_text_colorPremium | string | #FFFFFF | Recommended text color for optimal contrast and readability |
contrast_ratio_with_whitePremium | number | 3.15 | WCAG contrast ratio calculation between color and white |
contrast_ratio_with_blackPremium | number | 6.66 | WCAG contrast ratio calculation between color and black |
wcag_aa_compliant_with_whitePremium | boolean | false | Whether color meets WCAG AA contrast requirements with white |
wcag_aa_compliant_with_blackPremium | boolean | true | Whether color meets WCAG AA contrast requirements with black |
wcag_aaa_compliant_with_whitePremium | boolean | false | Whether color meets WCAG AAA contrast requirements with white |
wcag_aaa_compliant_with_blackPremium | boolean | false | Whether color meets WCAG AAA contrast requirements with black |
Failure modes
Errors come back as tool errors carrying a sentence the model can act on, not a bare status code. Error handling covers the full list.
| Status | What it means |
|---|---|
400 / 422 | The arguments did not validate. The message names the offending one. |
401 | The OAuth session is invalid or expired — reconnect the server. |
403 | Blocked by a key restriction or an IP allow-list. Never a bad identity. |
404 | This skill is not part of VerveKit. Check the catalog. |
429 | Out of credits, or a brief rate limit. The message tells them apart. |
A call costs 1 credit each time the tool actually runs; a model that reasons about the tool without calling it costs nothing.
Use cases
- Web Accessibility
- Ensure WCAG compliance by calculating contrast ratios for text and background colors
- UI Design
- Determine appropriate text colors for backgrounds based on brightness calculations
- Theme Development
- Automatically select light or dark text based on background color brightness
- Color Analysis
- Analyze color brightness and categorize colors for design systems and palettes
Other ways to use Color Brightness Skill
Set up Color Brightness Skill on VerveKit, or reach the same source a different way. Your VerveKit account and credits work on all of them — one key, one balance.
Related
More in Reference Data: