Menu

Search tools and guides

DMARC & DKIMCheck DMARC and DKIM, generate records and keys
SPF Record CheckerValidate SPF and count lookups against the limit of 10
DNS Blacklist CheckerCheck IPs and mail servers against spam blocklists
Email Header AnalyserTrace hops, delays and SPF/DKIM/DMARC in raw headers
Email ValidatorSyntax, MX, SPF and DMARC verification
DNS LookupQuery A, AAAA, MX, TXT, NS and more
WHOIS LookupRegistration data over RDAP
Website StatusAvailability and response-time checks
Ports ReferenceWhat runs on each TCP and UDP port, and if it's safe
MAC Address LookupFind a MAC address vendor and check if it's random
Download Time CalculatorHow long a file takes at your broadband speed
QR Code GeneratorQR codes for Wi-Fi, links and text, as PNG or SVG
User Agent ParserWhat your browser says about itself, decoded
IP ConverterDecimal, hex, binary and IPv6 conversion
Subnet CalculatorCIDR ranges, masks and subnet splitting
CIDR AggregatorMerge IPs and ranges into the fewest CIDR blocks
SSL CheckerInspect certificates, chains and expiry
HTTP HeadersAudit security headers and redirect chains
Password GeneratorCryptographically secure random passwords
Hash GeneratorMD5, SHA-1, SHA-256, SHA-384 and SHA-512
JWT DecoderDecode JWT claims and verify HS256, RS256, ES256
Unix Timestamp ConverterConvert epoch seconds or ms to UTC and UK time
UUID GeneratorGenerate UUID v4, v7 and ULIDs; decode any UUID
Cron Expression ExplainerCron schedules in plain English, with next runs
Regex TesterTest JavaScript regex with live match highlighting
Chmod CalculatorUnix permissions as octal, symbols and commands
Colour Contrast CheckerWCAG contrast ratio for text and background colours
JSON FormatterPretty-print, minify and validate JSON
Base64 EncoderConvert to and from Base64, Unicode safe
URL EncoderPercent-encode and decode URL strings
HTML EntitiesEscape and unescape HTML special characters
Text Diff CheckerCompare two texts line by line, word by word
Word & Character CounterWords, characters, reading time and SMS segments
Case ConverterUPPER, lower, Title Case, camelCase and more
URL Slug GeneratorTurn titles into clean, SEO-friendly URL slugs
DNS records explained: A, AAAA, CNAME, MX, TXT, NS and the restWhat each common DNS record type does, the rules that trip people up – CNAMEs at the root, MX pointing at an IP – and how TTL and caching really work.
Mbps and MB/s: why downloads look slower than your broadband speedWhy a 100 Mbps line downloads at 12 MB/s, why a 1 TB drive shows 931 GB, what slows real transfers, and what a UK advertised average speed promises.
Setting up SPF, DKIM and DMARC for Microsoft 365Step by step for a domain on Microsoft 365, from the first SPF record to a DMARC policy of reject, avoiding the mistakes that cause bounces.
SPF "too many DNS lookups": why it happens and how to fix itWhat the ten-lookup limit in RFC 7208 counts, how to tally your own record, and the fixes that work without silently breaking mail.
How to read a DMARC aggregate reportA field-by-field tour of the XML that receivers send to your rua= address, and how to turn it into a list of senders to fix before you enforce.
What your IP address reveals – and what it does notHow IP geolocation really works, why it often puts you in the wrong town, what a website can and cannot learn from your address, and how UK law treats it.
Diagnosing a website that will not load: DNS, TLS and HTTP in orderA methodical checklist for working out whether an outage is DNS, the certificate, the server or just you – and what each kind of failure looks like.

Arrow keys move through results, Enter opens one, Escape closes.

Colour Contrast Checker

Measure the WCAG contrast ratio between a text colour and its background, and see whether the pair passes AA and AAA.

Type a hex value (#rgb, #rrggbb or #rrggbbaa), rgb(), hsl() or a CSS colour name such as navy, or use the colour pickers. The result updates as you type.

Try:

About the Colour Contrast Checker

This tool measures how strongly a text colour stands out from the colour behind it, using the contrast ratio defined in the Web Content Accessibility Guidelines (WCAG) 2.x. It then tells you, in words, whether the pair meets each WCAG level, shows the two colours in use, and suggests the nearest shade that passes when yours does not.

How to use it

  1. Enter the text colour and the background colour. Hex, rgb(), hsl() and CSS colour names are all accepted, or choose with the colour pickers.
  2. Read the ratio and the table of results. Each line says Pass or Fail against its minimum.
  3. If the pair fails AA, press Use this colour on a suggested shade, or adjust the colours yourself.
  4. Press Copy link to share the pair; both colours are stored in the page address.

What the ratio measures

The ratio compares the relative luminance of the two colours: how much light each one gives off as the eye perceives it, from 0 for black to 1 for white. To find it, each of the red, green and blue values is scaled to the range 0 to 1 and converted from its gamma-encoded sRGB value to linear light. The three are then added with weights of 0.2126 for red, 0.7152 for green and 0.0722 for blue, because the eye is far more sensitive to green than to blue.

The contrast ratio is the lighter luminance plus 0.05, divided by the darker luminance plus 0.05. It runs from 1:1 (two identical colours) to 21:1 (black and white), and it is the same whichever of the two colours is the text. Hue plays no part, which is why red on green of similar brightness scores badly even though the colours look very different to many people.

#777777 on white  4.47:1  fails AA for normal text
#767676 on white  4.54:1  passes AA for normal text
black on white    21:1    the maximum

WCAG does not allow rounding up to a threshold, so 4.499:1 fails a 4.5:1 requirement. This tool cuts the ratio to two decimal places without rounding for that reason.

The WCAG 2.2 thresholds

  • Level AA, normal text – at least 4.5:1 (success criterion 1.4.3).
  • Level AA, large text – at least 3:1.
  • Level AAA, normal text – at least 7:1 (success criterion 1.4.6).
  • Level AAA, large text – at least 4.5:1.
  • User interface components and graphics – at least 3:1 against adjacent colours (success criterion 1.4.11, level AA). This covers things like input borders, icons, focus indicators and the parts of a chart needed to understand it.

Large text means at least 18pt, which is 24px in CSS, or at least 14pt bold, which is about 18.66px. Anything smaller counts as normal text.

Who it helps

Good contrast matters most to people with low vision, whose eyes need a stronger difference to make out letter shapes, and to people with colour vision deficiency, who may see two different hues as the same shade. It also helps everyone else in poor conditions: a phone screen in direct sunlight, a dimmed laptop, a cheap projector in a bright room.

The position in the UK

Public sector bodies are required to make their websites and mobile apps meet WCAG 2.2 level AA, and to publish an accessibility statement, under the Public Sector Bodies (Websites and Mobile Applications) (No. 2) Accessibility Regulations 2018. The regulations contain some exemptions. For other organisations there is no law that names a contrast ratio. The Equality Act 2010 places a duty on service providers in Great Britain to make reasonable adjustments for disabled people, and meeting WCAG AA is a widely used way of showing that a website is accessible, but the Act itself does not mention WCAG. This is general information, not legal advice.

What the ratio does not cover

  • Font weight and size beyond the two bands. A thin, light typeface at 4.5:1 can be harder to read than a sturdy one, and the ratio cannot see that.
  • Text over images and gradients. The background is not one colour, so check the point where the contrast is lowest, or put a solid panel behind the text.
  • Placeholder and disabled text. Placeholder text in a form field is still text and needs 4.5:1. Inactive (disabled) controls, pure decoration and logos are exempt from the contrast requirements.
  • Colour as the only signal. Passing contrast does not satisfy success criterion 1.4.1, which says information must not be conveyed by colour alone. A link inside a paragraph or an error state needs an underline, icon or wording as well.
  • APCA. Earlier working drafts of WCAG 3 explored a different method, the Accessible Perceptual Contrast Algorithm, which takes account of font size and weight and of which colour is the text. The current draft has not yet chosen a contrast method, so APCA is not a requirement, and its scores cannot be compared with the ratios shown here.

Transparency

A semi-transparent text colour, such as rgba(0, 0, 0, 0.6) or an eight-digit hex value, is blended over the background first, and the ratio is measured on the colour that results. That is what a reader actually sees. If the background itself is semi-transparent, the tool assumes it sits on white, because it cannot know what is behind it on your page.

Limitations

  • Colours are treated as sRGB with eight bits per channel. Newer CSS formats such as oklch(), lab() and color() are not read; convert them to hex or rgb() first.
  • The hsl values shown are rounded to one decimal place, and alpha values to two.
  • The suggested shade changes lightness only. It reaches 4.5:1, but a large change in lightness can move a brand colour a long way; treat it as a starting point.
  • A passing ratio does not make text readable on its own. Long passages in capitals are slower to read whatever the colours; the case converter turns them back into sentence case, and the word counter gives the reading time of the copy itself.

Privacy

The calculation runs in JavaScript in your own browser. The colours are not sent to a server. They are added to the page address after you change them, so that the link can be shared; nothing else is stored.

Common questions

What contrast ratio does WCAG AA require?

WCAG level AA requires a contrast ratio of at least 4.5:1 for normal text and at least 3:1 for large text (success criterion 1.4.3). User interface components and meaningful graphics, such as input borders and icons, need at least 3:1 against adjacent colours (success criterion 1.4.11). Ratios may not be rounded up, so 4.49:1 fails the 4.5:1 requirement.

What contrast ratio does WCAG AAA require?

WCAG level AAA requires a contrast ratio of at least 7:1 for normal text and at least 4.5:1 for large text (success criterion 1.4.6). That is stricter than level AA, which asks for 4.5:1 and 3:1. The highest ratio possible is 21:1, for black on white, so a pair of colours that reaches 7:1 still sits well within the scale.

What counts as large text in WCAG?

Large text in WCAG means text of at least 18pt, which is 24px in CSS, or bold text of at least 14pt, which is about 18.66px. Anything smaller counts as normal text. Large text is allowed a lower contrast ratio because bigger, heavier letters are easier to make out: 3:1 at level AA and 4.5:1 at level AAA.

What is the lightest grey text that passes WCAG AA on white?

The lightest pure grey that passes WCAG AA for normal text on a white background is #767676, with a contrast ratio of 4.54:1. One step lighter, #777777, scores 4.47:1 and fails the 4.5:1 minimum. For large text, which needs only 3:1, lighter greys are allowed. Enter any pair in the checker on this page to see its exact ratio.

Accessibility

Adjust how the site looks and behaves. Your choices are saved in this browser only.

Colour theme
Text size
Accessibility statement