How We Calculate
Every number on CoolColor Space comes from a published formula or an open dataset and is calculated in your browser. This page lists what each tool uses, which results are approximate and why, and how the data is checked.
Color conversions
HEX, RGB, HSL, HSV, HWB, LAB, LCH, OKLCH and the other formats are converted with culori, an open-source color library. A LAB, LCH or OKLCH color outside the sRGB range a screen can show is clamped to the nearest sRGB value.
CMYK uses the simple formula from RGB, without a print profile. Real print values depend on the press, the inks and the paper, so for print use the CMYK values from your printer's profile.
Contrast
The contrast checker uses the WCAG 2 formula: the relative luminance of both colors and the ratio between them, from 1:1 to 21:1. The thresholds are 4.5:1 for normal text and 3:1 for large text at level AA, and 7:1 and 4.5:1 at level AAA. APCA, a separate contrast method, is not part of WCAG 2 or of the current WCAG 3 draft, and is not implemented here.
Ratios close to a threshold matter: on white, #767676 reaches 4.54:1 and passes AA, while #777777 is 4.48:1 and fails, even though it would round to 4.5.
The image contrast checker applies the same formula to text over a photo. The pixels in the selected box are split by luminance with Otsu’s method; the group made of thinner shapes is the text, parts of it more than 2.5 times thicker than a stroke (a bright sun behind light letters) go back to the background, and background pixels touching the letters are dropped as anti-aliased edges. The text color is compared with every remaining background pixel, and the result is given for the median and for the 10th percentile. Using the 10th percentile for pass or fail is our choice: WCAG 2 does not define how to measure text on a varied background. The suggested overlay is the lowest opacity of black or white, blended the way browsers blend rgba() layers, that brings that 10th-percentile pixel up to the target ratio.
Color difference (ΔE)
Wherever the site finds the closest match — Pantone, DMC, Tailwind or a color name — it ranks candidates by CIEDE2000 (ΔE 2000), a standard color difference formula designed to follow how people perceive differences. As a guide: below 1 the difference is not visible, 1 to 3 is a close match, 3 to 6 is noticeable, and from 6 up the colors are visibly different.
Pantone® approximations
Pantone colors are physical inks, and their official digital values are licensed. The 1,342 Pantone code values on this site come from open, MIT-licensed community packages. A code is included only if it exists in an X-Rite color book and its value agrees with at least one independent conversion within ΔE 3. The Color of the Year pages are separate: their screen values come from the Wikipedia article on Pantone, and the year, name and TCX code of each color are confirmed by a second published source.
These are approximations of ink on screen, not official Pantone values. Before printing, check the color in a physical Pantone guide. Pantone® is a trademark of Pantone LLC; this site is not affiliated with Pantone.
DMC threads
The thread colors come from the open craft-color-codes list (CC BY 4.0). Open DMC lists disagree with each other: between the two independent lists we compared, the median difference is ΔE 6.9. Codes where both lists agree within ΔE 3 are marked as stable — 64 of 489. Most diamond painting kits number their drills with the same DMC codes, so the diamond painting chart shows these floss colors for the 154 drill codes in craft-color-codes.
Thread has sheen and dye lots vary, so check a real skein or a color card before buying. DMC is a trademark of DMC; this site is not affiliated with DMC.
RAL colors
RAL Classic colors are defined by physical samples, and RAL gGmbH publishes no screen values we can use. The values shown come from three open lists, ral-colors, ralative and Bit&Black colorpalette (all MIT); ral-colors and ralative differ by a median ΔE of 4.6. Codes whose open values we could not confirm are left out, so the chart has 127 codes, not the whole range. Codes where another list agrees within ΔE 3 are marked «Open lists agree» — 101 of 127. Each code page shows the values side by side.
Paint and powder coatings change with gloss, texture and light, so check an original RAL color fan before ordering. RAL is a trademark of RAL gGmbH; this site is not affiliated with RAL.
Anchor threads and DMC ↔ Anchor
Anchor colors come from the open go-cross-stitch list (MIT). Open Anchor lists disagree too: between the two independent lists we compared, the median difference is ΔE 6.5, and 54 of 442 codes agree within ΔE 3. DMC to Anchor and Anchor to DMC do not copy a conversion chart — we found none with a clean licence — but rank the other brand's threads by CIEDE2000 from the entered thread's color.
The result is the nearest thread by on-screen color, not an official equivalence. Anchor is a trademark of its owner; this site is not affiliated with that owner.
Tailwind CSS colors
HEX to Tailwind uses the default palettes of Tailwind CSS 4.3.3 and 3.4. Tailwind v4 defines its colors in OKLCH; we compare against the sRGB color a screen actually shows for each one, so a color picked from a v4 site finds its own class.
Color blindness simulation
The simulator follows published models, as reviewed by DaltonLens:
- protanopia and deuteranopia — Viénot, Brettel and Mollon (1999);
- tritanopia — Brettel, Viénot and Mollon (1997);
- protanomaly and deuteranomaly — Machado, Oliveira and Fernandes (2009), with a severity slider;
- tritanomaly — the Brettel 1997 model blended with the original color by severity;
- achromatopsia — luminance only.
The calculation runs in linear RGB, not on gamma-encoded values, which would make reds and purples look far too dark. Photos, videos and the camera are processed on your device and never uploaded.
The simulation shows roughly how colors may look. It is a design aid, not a medical test.
Palettes
The palette generator builds harmonies — complementary, analogous, triadic and others — by rotating the hue in HSL, and tints and shades by changing HSL lightness. HSL steps are simple but not perceptually even, so two tints can look further apart than their numbers suggest.
Palettes from an image or a video use median cut, which splits the picture's colors into groups and takes the average of each. The file is read in your browser and is not sent to a server.
Paint mixing
The color mixer uses the open-source spectral.js library (MIT). Each color is turned into a reflectance curve built from seven basic curves, the curves are mixed by single-constant Kubelka-Munk theory, weighted by each color's share, luminance and tinting strength, and the result is converted back to sRGB under D65. This is a model of pigments in general: a real paint with the same screen color can mix differently.
Next to it the mixer shows the share-weighted average of the gamma-encoded RGB values, the way a semi-transparent layer blends. The color names beside the results are rough labels from OKLCH hue and lightness.
How the data is checked
Before changes are published, an automated check compares the color data with reference values, for example:
- every converter converts its own examples correctly;
- every Pantone code and page address reads back to the same color;
- Tailwind values match reference colors from the Tailwind documentation, and every Tailwind and DMC color finds itself as its own closest match;
- the simulator's output matches the DaltonLens reference values within ΔE 2, type by type.
Found a wrong number?
If a value looks wrong, tell us which page and which color. We recalculate it and fix the data or the explanation.
Sources
- W3C (2018, current edition 6 May 2025). Web Content Accessibility Guidelines (WCAG) 2.1: definitions of relative luminance and contrast ratio, success criteria 1.4.3 and 1.4.6. Link
- Luo M. R., Cui G., Rigg B. (2001). The development of the CIE 2000 colour-difference formula: CIEDE2000. Color Research & Application 26(5), 340–350. DOI
- Sharma G., Wu W., Dalal E. N. (2005). The CIEDE2000 color-difference formula: implementation notes, supplementary test data, and mathematical observations. Color Research & Application 30(1), 21–30. DOI
- Viénot F., Brettel H., Mollon J. D. (1999). Digital video colourmaps for checking the legibility of displays by dichromats. Color Research & Application 24(4), 243–252. DOI
- Brettel H., Viénot F., Mollon J. D. (1997). Computerized simulation of color appearance for dichromats. Journal of the Optical Society of America A 14(10), 2647–2655. DOI
- Machado G. M., Oliveira M. M., Fernandes L. A. F. (2009). A physiologically-based model for simulation of color vision deficiency. IEEE Transactions on Visualization and Computer Graphics 15(6), 1291–1298. DOI
- libDaltonLens: public-domain implementation of the Viénot and Brettel models (DaltonLens). Link
- Kubelka P., Munk F. (1931). Ein Beitrag zur Optik der Farbanstriche. Zeitschrift für technische Physik 12, 593–601. English translation by S. Westin. Link
- spectral.js: Kubelka-Munk paint mixing in JavaScript (MIT licence). Link
- Newhall S. M., Nickerson D., Judd D. B. (1943). Final report of the O.S.A. subcommittee on the spacing of the Munsell colors. Journal of the Optical Society of America 33(7), 385–418. DOI
- Munsell Color Science Laboratory, Rochester Institute of Technology: Munsell renotation data. Link