{"inline_daily":{"color-converter":{"accessibility_wcag":"Accessibility (WCAG)","contrast_ratio_with":"Contrast {{score}}:1 with {{color}}","white":"White","black":"Black","picker":"Picker","preview":"Preview","grade_fail":"Fail"}},"docs_daily":{"tools":{"color":{"content":{"title":"Convert HEX, RGB, HSL and CMYK and check WCAG contrast","intro":"A HEX code is the base-16 form of the three RGB channels (0 to 255): #10B981 is RGB(16, 185, 129), which is HSL(160°, 84%, 39%) and CMYK(91, 0, 30, 27). The tool also computes contrast against white or black text with the WCAG formula: 8.28:1 against black here, level AAA.","details":"

Conversions

WCAG contrast

Each channel is linearised (c ÷ 12.92 below 0.04045, otherwise ((c + 0.055) ÷ 1.055)2.4), then L = 0.2126 R + 0.7152 G + 0.0722 B. Contrast ratio = (Llighter + 0.05) ÷ (Ldarker + 0.05). For #10B981, L = 0.364: 2.54:1 on white, 8.28:1 on black. The tool keeps the better of the two and shows AAA from 7:1, AA from 4.5:1, otherwise “fail”. These are the normal-text thresholds; large text (18 pt, or 14 pt bold) only needs 3:1 for AA and 4.5:1 for AAA, which the tool does not distinguish.

Palette and limits

The palette keeps hue and saturation and varies HSL lightness (95, 80, 60, 40 and 20%). CMYK conversion is purely mathematical, with no ICC profile or ink limit: have your printer validate values for print work. Contrast is only checked against pure white and pure black.

Sources and dates: 4.5:1 and 7:1 thresholds (success criteria 1.4.3 and 1.4.6) and the relative luminance definition from Web Content Accessibility Guidelines (WCAG) 2.2, W3C Recommendation of 12/12/2024 (checked 14/10/2026).

"}},"color-converter":{"faqs":[{"question":"What minimum contrast does WCAG require?","answer":"Level AA requires at least 4.5:1 for normal text and 3:1 for large text (18 pt, or 14 pt bold). Level AAA raises this to 7:1 and 4.5:1. These thresholds are success criteria 1.4.3 and 1.4.6 of WCAG 2.2."},{"question":"How do I convert a HEX code to RGB?","answer":"Split the code into three pairs and convert each from base 16 to base 10: #10B981 gives 10 = 16, B9 = 185, 81 = 129, so RGB(16, 185, 129). A short form such as #0f8 reads as #00ff88."},{"question":"Is the RGB to CMYK conversion reliable for print?","answer":"It gives a ballpark. The formula K = 1 − max(R, G, B) ignores the ICC profile of the paper and press, so the printed colour can differ from the screen. Ask your printer for values matched to their profile."},{"question":"Is my colour readable with white text?","answer":"Compute (L lighter + 0.05) ÷ (L darker + 0.05). The green #10B981 only reaches 2.54:1 with white, below the 4.5:1 AA threshold, but 8.28:1 with black. The tool picks the more readable text colour automatically."}]}}}}