← Back to directory

Convert a color between hex, RGB, HSL and OKLCH and check WCAG contrast (Tanod)

https://tanod.dev/v1/color/convert

Overview

A CSS color (hex #rgb / #rrggbb / #rrggbbaa, rgb(), hsl() or one of the 148 CSS names) as hex, rgb, hsl, hsv, a naive cmyk (labelled: no ICC profile), OKLCH and its WCAG relative luminance; with a second color (`background`), also the WCAG 2.x contrast ratio and AA / AAA pass or fail for normal and large text and AA for UI components. Pass / fail compares the unrounded ratio: #777 on white is 4.48:1 and fails AA normal text. Body: `{"color": "#777", "background": "white"}`. A

Protocol x402 (POST)
Price $0.0010
Payment Asset USD Coin
Payment Network eip155:8453
Category media/images
Provider tanod
Source bazaar
Indexed 2026-10-08 13:30:55

Health

Status healthy
Latency (p50) 382ms
Uptime (30d) 96.0%
Reliability Score 93/100
Last Checked 2026-10-31 07:05:30
Last Healthy 2026-10-31 07:05:30
Consecutive Failures 0

x402 Payment Validation

Payment Requirements Valid
Asset Verified Known USDC
Facilitator —

Input Schema

{ "body": { "background": "white", "color": "#777" }, "bodyType": "json", "method": "POST", "type": "http" }

Output Schema

{ "example": { "background": { "alpha": 1, "cmyk": { "c": 0, "k": 0, "m": 0, "note": "naive RGB to CMYK formula (no ICC profile, no ink limits):…", "y": 0 }, "hex": "#ffffff", "hex8": "#ffffffff", "hsl": { "css": "hsl(0 0% 100%)", "h": 0, "l": 100, "s": 0 }, "hsv": { "h": 0, "s": 0, "v": 100 }, "oklch": { "c": 0, "css": "oklch(100% 0 none)", "h": null, "l": 1 }, "rgb": { "b": 255, "css": "rgb(255 255 255)", "g": 255, "r": 255 } }, "color": { "alpha": 1, "cmyk": { "c": 0, "k": 53.33, "m": 0, "note": "naive RGB to CMYK formula (no ICC profile, no ink limits):…", "y": 0 }, "hex": "#777777", "hex8": "#777777ff", "hsl": { "css": "hsl(0 0% 46.67%)", "h": 0, "l": 46.67, "s": 0 }, "hsv": { "h": 0, "s": 0, "v": 46.67 }, "oklch": { "c": 0, "css": "oklch(56.93% 0 none)", "h": null, "l": 0.5693 }, "rgb": { "b": 119, "css": "rgb(119 119 119)", "g": 119, "r": 119 } }, "contrast": { "aa_large_text": true, "aa_normal_text": false, "aa_ui_components": true, "aaa_large_text": false, "aaa_normal_text": false, "ratio": 4.48, "ratio_text": "4.48:1", "ratio_unrounded": 4.478089 } }, "type": "json" }

Also available via

MPP
healthy
$1000.00
on
View details →