Play n Tools

Free tools & games for everyone

Free · No sign-up · No accounts

Colour palette & contrast checker

Check text and background contrast against WCAG, convert HEX, RGB and HSL, build colour palettes, and pick colours out of your own image.

Normal text: the quick brown fox jumps over the lazy dog.

Large text: 24 px or 19 px bold

    Palette from the text colour

    Colours from your image

    How to use

    1. Pick a text colour and a background colour, or type codes such as #3b6970, rgb(59, 105, 112) or hsl(188, 31%, 34%).
    2. Read the contrast ratio and the pass or fail result for each WCAG level. The preview shows real text.
    3. If it fails, press Use the passing colour to get the nearest text colour that passes AA.
    4. Choose a palette kind to see matching colours; tap any swatch to use it as the text colour.
    5. Choose an image to pull out its main colours. It is read in your browser and never uploaded.

    Keyboard and touch

    TabMove between pickers, codes and swatches
    Enter in a code boxUse the typed colour
    Enter on a swatchUse it as the text colour

    Tips

    • AA (4.5:1 for normal text) is the level most laws and guidelines ask for. AAA (7:1) is even easier to read.
    • "Large text" means at least 24 px, or 19 px bold.
    • Light grey text on white is the most common failure. #767676 is the lightest grey that passes AA on white.
    • Never show meaning by colour alone; add words, icons or underlines too.

    About this tool

    Contrast follows WCAG 2: each colour's relative luminance L is worked out from its sRGB values, and the ratio is (Llighter + 0.05) ÷ (Ldarker + 0.05), from 1:1 (same colour) to 21:1 (black on white). Ratios are rounded down, so a colour shown as passing really does pass. The passing suggestion keeps the hue and saturation and changes only the lightness.

    Image colours are found by grouping similar pixels and keeping the most common groups. Nothing you choose leaves your device.

    See you tomorrow!

    A fresh daily puzzle every morning, and new tools added every month.

    Browse every product