EarnToLink Tools

All tools / Colour swatch preview, contrast and look-alike check

Colour swatch maker and checker

Paste your colour names with hex codes, see them as swatches on your own background colour, and catch the ones shoppers cannot tell apart.

Free. No signup. Runs entirely in your browser: nothing you enter or choose is uploaded.

Build and check colour swatches

Checks

How to use the swatch maker

  1. Type or paste one colour per line: the name shoppers see, then a hex code such as #1f2a44. A comma, a space or a tab between them all work.
  2. Set the background to the colour of your product page, so the preview matches your store.
  3. Choose circles or squares and a size. Most themes use 24 to 40 pixels.
  4. Read the checks under the preview, fix the names or codes, then copy the HTML or download a CSV of names and codes.

What the checks mean

Close to the background: white, ivory and very pale colours almost vanish on a white page. The tool measures the contrast ratio against your background and adds a thin grey border when it is below 1.5 to 1, the same fix most themes use.

Look almost the same: the tool converts each colour to the CIELAB colour space and measures the distance between every pair. A distance under 10 usually means two swatches are hard to tell apart at small sizes. Rename them, adjust the codes to match your real products, or show a photo instead of a flat colour.

Name used twice: two swatches with the same name confuse shoppers and filters.

Getting the hex code right

Take the colour from a product photo shot in neutral light, not from the supplier's chart, because dyes and screens differ. Use one sample point on a flat area without shadow. For patterns, a small image swatch is clearer than any single colour.

Frequently asked questions

What is a colour swatch on a product page?

A small coloured shape that stands for one colour option. Clicking it shows that colour of the product.

Can I paste the HTML into Shopify?

Yes, into a product description or a custom liquid block. It is static: the swatches show colours but do not switch variants or products.

What does visually-hidden do in the HTML?

It keeps the colour name readable for screen readers. Many themes, including Dawn, already define that class.

Is anything uploaded?

No. The checks run in your browser.

More free tools