Before you start

What you need

  • A page where you can paste HTML: a site you build, a CMS that accepts an iframe, or a course page.
  • Nothing to install, no account and no key.

Setup

Step by step

  1. Copy the iframe

    Paste it where the checker should appear. The title names the frame for screen readers: keep it, in your page’s language.

    The iframe

    <iframe src="https://auricartisan.com/embed/contrast/" title="Contrast checker" width="420" height="620" style="max-width:100%;border:0" loading="lazy"></iframe>
  2. Choose the colors, the theme and the language

    Add any of the options below to the address. Without them it starts with grey on white, follows the reader’s light or dark setting, and speaks English.

    The options the address takes
    OptionValuesWithout it
    fgThe text color: three or six hex digits, without the # (in an address, # starts a fragment)8A8A8A
    bgThe background color, the same wayFFFFFF
    theme

    light or dark

    The reader’s system setting
    lang

    hi for Hindi

    English
    credit

    0 hides the credit link

    Shown

    An address with options

    https://auricartisan.com/embed/contrast/?fg=1F2937&bg=FFFFFF&theme=dark&lang=hi
  3. Give it room

    The checker does not resize its frame. On the check its content was 601 pixels tall at 420 pixels wide and 717 at 320, so the iframe above is 620 pixels tall; on a narrow column give it 730. A frame that is too short scrolls inside.

  4. Credit, if you like

    The checker shows a small “Made by Auric Artisan” link, which credit=0 removes. A credit beside the frame is welcome and never required, in any words you like.

    A credit beside it, optional

    <p>Contrast checker from <a href="https://auricartisan.com/integrations/embed/">Auric Artisan</a></p>

Try it

The checker, as it embeds

Type a color, or pick one, and press Tab. A pair that fails AA gets the nearest text color that passes, and “Use it” takes it.

The embed itself, framed here exactly as on another site. Open it in its own tab

Verification

What was checked

The embed as served by the site, in each theme. The last two columns are what each check found.

The checks, with what each found in each theme
CheckWhat it meansLight themeDark theme
Text contrastEvery word the checker writes reaches 4.5:1 on its background. The sample is a picture of your pair, so it is not counted.

6.53:1 at its lowest

Passes

8.04:1 at its lowest

Passes
BoundariesThe edges of the fields and buttons reach 3:1 against the background.

4.84:1 at its lowest

Passes

5.15:1 at its lowest

Passes
Keyboard focusEvery stop shows a 2-pixel outline at 3:1 or more.

7 of 7 stops; outline 6.70:1

Passes

7 of 7 stops; outline 8.41:1

Passes
Target sizeEvery field and button is at least 24 by 24 pixels.

36 px at the smallest

Passes

36 px at the smallest

Passes
Forced colorsWith forced colors on, every field and button keeps a visible border.

6 of 6 keep a border

Passes

6 of 6 keep a border

Passes
Automated rulesaxe, with the WCAG 2.2 A and AA rules.

0 violations

Passes

0 violations

Passes

How it behaves

How the embed behaves, as checked
BehaviorResult
It loads in a frame on another site, and a normal page of this site framed beside it is refusedPasses
The ratio and the suggestion are the site’s color engine’s, for the default pair and for a typed onePasses
“Use it” takes the suggestion, and focus returns to the text colorPasses
A color it cannot read is marked invalid, with the reason, and the last good pair staysPasses
After a pause, the ratio and the AA result are announced oncePasses
At 280 pixels wide nothing scrolls sidewaysPasses

With lang=hi every word is in Hindi, and the page says so

Passes
Nothing is stored: no cookies, no local storagePasses

Weight

Everything it loads

These files, from this site, and nothing else. The check failed if any other request was made.

The files the embed loads, with their sizes
FileSizeCompressed
/embed/contrast/6.0 KB1.4 KB
/js/embed/contrast-boot.js0.5 KB0.3 KB
/css/embed/contrast.css5.3 KB1.8 KB
/js/embed/contrast.js4.5 KB1.8 KB
/js/embed/contrast-words.js3.5 KB1.3 KB
/js/tool/color-tools/utils/color-core.js19.4 KB7.0 KB
Total39.2 KB13.6 KB

Limits

What it does not do

  • Hex colors only, in three or six digits. Names such as teal and other notations are not read.

  • The ratio is WCAG 2’s. APCA is not shown; the full checker on this site has it.
  • The suggestion changes the text color, keeping its hue, to reach AA for normal text. Changing the background instead is up to you.
  • It does not resize its frame: give it the height above.
  • Framing was checked on a local copy of the site, which sends the headers that the live site’s _headers file sets for /embed/.

Privacy and access

What it stores and sends

  • Nothing: no cookies, no local storage, no analytics, and no request beyond the files above. The colors stay in the reader’s browser.
  • Its pages allow only their own files to run, so nothing else can be injected into the frame on your site.
  • Like every page on this site, it is served through Cloudflare, which sees the request for it.

Go further

The full reference

Checked against

Where these facts come from

Versions, requirements and examples on this page were checked on . The embed was loaded from a local copy of the site in Chromium, in both themes, in Hindi and at four widths, with axe 4.12.1. It was framed from another origin beside a normal page that had to be refused, and its files were measured as served.

Found a mistake? Write to us and we will correct it.