Colour contrast
Pick a foreground (text) and a background colour to get the WCAG contrast ratio (1:1 to 21:1), see whether body text and large text pass AA / AAA, and when they do not, get a concrete fix such as “make the background darker to #767676” with one click to apply. Both colours are shown as HEX / RGB / HSL with relative luminance, common pairs are built in, and the foreground and background can be swapped or the summary copied. Everything is computed locally in your browser; nothing is uploaded.
Free and no sign-up. Colour contrast computes and renders entirely in your browser; nothing you enter is uploaded.
More tools in More tools
- Regex tester — Enter a regular expression and test text to highlight every match live, list each match position and its capture groups, and preview the replacement result.
- Text diff — Paste one text on each side to compare them line by line: added and removed lines are colour-coded per line, changed lines drill into the line to highlight the exact differing characters, and the change list reports the line number, column and characters involved. Toggle case- and whitespace-insensitive comparison, show only changed lines, swap the sides, and copy a paste-ready diff report. Everything runs locally in your browser and nothing is uploaded.
- Emoji library — Browse all 1849 emoji from Unicode 15.1 in nine groups (smileys, people, animals, food and more). Search by Chinese or English name — everyday words like "red packet" or "happy birthday" work too — then click any emoji to copy it instantly; recent picks are remembered for next time. Everything runs locally in the browser; nothing is uploaded.
- Text to ASCII art — Turn multiple lines of text into ASCII art, setting the size, typeface (sans, serif, Kai, monospace, Impact or rounded), bold, italic, left / centre / right alignment, a dedicated fill character and the line spacing for each line independently. Switch the whole page to Plain text for verbatim output, or use each line's own Display switch (follow overall / ASCII art / plain text) to mix raw text and ASCII characters in one artwork. Plain-text lines keep their own typeface, size, bold and italic too: those styles show in the preview and in PNG / SVG / HTML exports, while copying and TXT stay plain text. Paste a block and split it into lines, then pick from 10 frame styles (ASCII, double rule, hash, stars, rounded, double, heavy, solid blocks and more), padding, a default line spacing that any line can override, and a character ramp; surplus blank rows above and below each line are trimmed automatically. Everything is generated locally in the browser; nothing is uploaded.
- Web-safe colours — Browse all 216 web-safe colours grouped by the red channel (each channel steps 00 / 33 / 66 / 99 / CC / FF); click a swatch to select it, then copy the HEX, the 3-digit shorthand, RGB, HSL, HSV, CMYK and the contrast against black or white text. Any colour you type is snapped to the nearest safe colour, and you can filter by value or show greys only.
- IP address — Parse an IPv4 / IPv6 address into its type, binary and decimal forms and subnet details (network address, broadcast address, usable range). Opening the page also looks up your public outbound IP from our backend, configured per environment.
Frequently asked questions about Colour contrast
- How is the contrast ratio computed, and why does it max out at 21:1?
- Each colour is first turned into relative luminance: divide every channel by 255, then undo the sRGB gamma (divide by 12.92 at or below 0.04045, otherwise raise ((v + 0.055) / 1.055) to the power of 2.4), and weight the channels 0.2126, 0.7152 and 0.0722. Contrast = (lighter luminance + 0.05) / (darker luminance + 0.05). Pure black has luminance 0 and pure white 1, so (1 + 0.05) / (0 + 0.05) = 21 — that is the theoretical maximum, and closer colours approach 1:1.
- What is the difference between AA and AAA, and why are the thresholds different for large text?
- WCAG 2.1 asks for at least 4.5:1 for body text at AA and 7:1 at AAA. Large text — 18pt, roughly 24px at regular weight, or 14pt, roughly 18.66px bold — has thicker strokes, so the thresholds drop to 3:1 for AA and 4.5:1 for AAA. All four are listed side by side so you can see which pass and which fail: a heading-only palette can be judged as large text, but as soon as there is a paragraph, 4.5:1 applies.
- Where do the suggested colour values come from, and can I use them directly?
- With the other colour held fixed, the side being adjusted is walked one step at a time (1/255) towards darker and towards lighter, and the first value that crosses the threshold is kept. Suggestions are then ordered by how much they change, and anything beyond a 50% shift is dropped — that is essentially “turn everything black or white” and tells you nothing. A suggestion only guarantees the ratio, not that it looks good or matches your brand, so check it against the preview before adopting it.
- Why does a pair look fine in a screenshot but fail the check?
- Your eye is influenced by font size, weight, surrounding whitespace and screen brightness, while WCAG only sees the relative luminance of two colour values. Light grey on white or coloured text on a pale background is the usual culprit: a word or two looks fine, but a whole paragraph becomes tiring, especially at small sizes and low brightness. Judging with the actual font size (4.5:1 for body text) is more reliable than intuition. Translucent colours should be composited with the background first — this page only handles opaque values.
- Does the checker upload my colours? Do I need to pay or sign in?
- No on both counts. Colour parsing, contrast computation and the suggestions all run locally in your browser; nothing is uploaded, nothing is written to local storage, and everything is released when you close the page. The tool is free, needs no account and has no usage limit.
- Does the content these tools process stay local?
- No. Your input exists only in the memory of the current page, is released when you reload or close it, and is never written to local storage.
- Can I keep using the tools offline?
- Once the page has loaded, regex testing, Emoji lookup, colour reference and character conversion need no network; only the IP address page needs to be online, because it asks our backend for your local outbound address when it opens.
- Do I need to register or pay to use Colour contrast?
- Most tools are free with no sign-up and no usage limits; a few pay-per-use features (AI watermark removal, AI background removal, AI image generation, AI upscaling, AI ID photo, AI annotation, PDF to Word, AI flowchart, AI mind map and AI Mermaid chart) show their price on the page.
- Is the data I process with Colour contrast uploaded to a server?
- No. Computation and rendering happen locally in your browser and your input is never sent to the server; only the IP address page queries our backend for your public IP on entry, carrying no input. Features that need backend processing (AI watermark removal, AI background removal, AI image generation, AI upscaling, AI ID photo, AI annotation, PDF to Word, AI flowchart, AI mind map, AI Mermaid chart and the SME financial report) explain their upload scope on their own pages.
About Local Toolbox
Local Toolbox groups the small tools you reach for every day by what you are doing: formatters and converters, date maths, documents and résumés, codes and ID cards, images, encryption, diagramming, and annotation and accounting. Open a page and start working — no sign-up, and almost every tool has no usage limit.
Most features compute inside your browser, so your input never leaves your device; the pages are plain static assets, load fast and keep working offline. The IP page asks our backend for your outbound address when it opens and sends none of your input. AI watermark removal, AI background removal, AI image generation and AI upscaling send content to our backend for inference (watermark removal is ¥1 per run; background removal is ¥1 per run; image generation and upscaling are priced by resolution — 2K ¥2, 4K ¥3); AI annotation sends images to a large model that locates the target and returns coordinates (¥0.5 per image, refunded only when every image in the batch fails); AI flowchart, AI mind-map and AI Mermaid chart generation send your text description to a model that builds the diagram (three separate products, charged ¥0.5, ¥0.5 and ¥0.5 per run respectively); and the accounting helper sends the income, expense, social-insurance and balance figures you fill in to generate a report (¥0.5 for the spoken analysis, ¥1 for the report). These features accept Alipay and WeChat Pay, upload nothing before payment succeeds, and refund automatically if processing fails.
- Local first: Parsing, conversion, encoding and image processing all happen in your browser and nothing you type is uploaded (AI watermark removal and AI background removal need the image, AI image generation and upscaling need one upload to obtain a URL, AI annotation needs the images for the model, AI résumé rewriting needs your résumé text, AI flowchart and mind-map generation need your text description, and the accounting helper needs the figures you submit).
- Pay per use, prices in plain sight: Almost every tool is free, needs no account and has no usage limit. Only AI watermark removal (¥1 per run), AI background removal (¥1 per run), AI image generation and AI upscaling (2K ¥2, 4K ¥3), AI annotation (¥0.5 per image), AI résumé rewriting (¥0.5 per run), AI flowchart, mind-map and Mermaid chart generation (¥0.5, ¥0.5 and ¥0.5 per run) and the accounting helper (¥0.5 for the spoken analysis, ¥1 for the report) are charged per use. Alipay and WeChat Pay are supported, nothing is uploaded before you pay, and failed runs are refunded automatically.
- One link per tool: Every tool has its own link, so bookmarks and shared URLs always land on the same page.
Links