thoughtasylumTOOLBOX Preview Guides Use offline Automate Feedback

Tools › Images

Colour Converter

Pick a colour from a saturation and brightness square with hue and opacity sliders, the system colour picker, the screen (in Chrome and Edge), or any CSS colour typed in (#hex, rgb(), hsl(), oklch(), names) or CMYK. CMYK is worked out through a real printing profile (FOGRA39, GRACoL and others), with total ink and how close the print comes to the screen colour. It also finds the nearest Tailwind CSS colour and writes the shades as a Tailwind v4 theme.

About this tool What it's for, how to use it and an example

What it's for

Pick a colour and get it in every format you might need, along with shades, matching colours, and a check that text in that colour is readable. It also finds the nearest colour in Tailwind CSS’s default palette, so you can name a colour by its Tailwind step.

  • When you’re turning a colour from a design into CSS, SwiftUI or AppKit code.
  • When you’re choosing CMYK values for print, or checking how a screen colour will come out on paper.
  • When you’re building a palette from one brand colour, or writing a Tailwind v4 theme from it.
  • When you’re checking that text meets accessibility contrast guidelines.

How to use it

Choose a colour from the saturation and brightness square, using the hue and opacity sliders, or use the system colour picker, Pick from screen (in Chrome and Edge), or Random. You can also type any CSS colour: a hex code, rgb(), hsl(), oklch() or a name such as teal. You get HEX, RGB, HSL, HSB (as the macOS picker shows it), OKLCH, SwiftUI and AppKit values to copy.

Nearest Tailwind names the colour in Tailwind CSS’s default palette that is closest to yours, with its OKLCH value. Distance (ΔE OK) is how far apart the two are: 0 is the same colour, and the larger the number, the further apart.

Print (CMYK) converts the colour through the ICC profile (a file describing how a press, its inks and its paper reproduce colour) of the Printing condition you choose: FOGRA39 for coated paper in Europe, GRACoL or SWOP in the US, and others. This is how Photoshop and InDesign work it out, so with the same profile and intent you get the same values, give or take a point. Rendering intent sets how colours the press can’t reach are brought in: Relative colorimetric (Photoshop’s default) keeps every colour it can exactly and moves the rest to the nearest it can print; Perceptual shifts everything a little to keep the differences between colours. You also get the Total ink (C + M + Y + K), the colour As printed, shown in the swatch beside your screen colour, and the Difference (ΔE 2000) between the two, where about 1 is the smallest difference most people can see. You can also type CMYK, as cmyk(0 50 100 0), device-cmyk(0% 50% 100% 0%) or an InDesign swatch name such as C=0 M=50 Y=100 K=0; it’s kept as typed and the screen colour shows how it prints. The printing condition and intent are remembered in this browser.

Below, Shades and Harmonies suggest related colours; click one to use it. The shades also fill in Tailwind v4 theme, a @theme block with --color-brand-100 to --color-brand-900, ready to paste into a stylesheet. Copy it with Copy Tailwind theme. Contrast compares the colour against a background you choose and shows whether it passes the WCAG AA and AAA guidelines.

Example

Type this in Any CSS colour:

#0798F5

You get rgb(7 152 245), hsl(203 94% 49%) and oklch(66.1% 0.173 247.1). The nearest Tailwind colour is sky-500, at a distance of 0.038. Against white, the contrast is 3.08 : 1: it passes for large text and interface parts, but not for normal body text. Under Print (CMYK), with FOGRA39 and relative colorimetric, it’s C 72 M 32 Y 0 K 0, and the difference of 4.5 means the print comes out a little duller than the screen.

Then type the InDesign swatch name:

C=0 M=100 Y=100 K=0

The screen colour becomes #e31f25, the red this ink mix prints on coated paper, with a total ink of 200%.

Good to know

Contrast follows WCAG 2 and ignores opacity. Pick from screen only works in browsers that support it, such as Chrome and Edge. The Tailwind palette is the default one from Tailwind CSS v4.1; a project that has changed its colours won’t match, and the nearest colour is only the closest of Tailwind’s own steps, not a recommendation. Many of Tailwind v4’s colours are brighter than sRGB (the colour set most screens and hex codes use) can show, so a hex colour may be a little away from its exact step, as #3B82F6 is from blue-500. The theme’s names (brand-100 to brand-900) are for the nine shades, and their lightness doesn’t follow Tailwind’s own steps. Copy Tailwind theme copies the shades only, not the other tints or harmonies.

CMYK is only as accurate as the match between the profile and the real press: ask your printer which printing condition or profile they use, and use a printed proof for colour-critical work.

As printed is the ink’s colour as the profile measures it on that paper, with the paper shown as pure white and its blacks as deep as the paper really allows, which is why dark colours look greyer on uncoated paper. Design apps’ previews often stretch the print’s black to the screen’s (black point compensation), so they can look closer than the print will be; the Difference is worked out from the same colour as the swatch. Some differences aren’t the press at all. Your screen’s brightness, colour settings and range change the swatches, a screen that shows fewer colours than sRGB can’t show some of them, real paper is seldom pure white (uncoated is often warmer, recycled greyer), and a print looks different in daylight, office lighting and lamplight. Rendering intent changes which CMYK a screen colour is given, not how a CMYK prints, so typed CMYK looks the same with either. A profile is downloaded from this site the first time you choose it (2 to 9 MB), then kept for offline use. ECI’s newer PSO Coated v3 (FOGRA51) profile isn’t included, as its licence doesn’t allow it to be shared from another site; you can download it from ECI.

There’s no Pantone conversion. Pantone colours are Pantone LLC’s intellectual property: their names, numbers and colour values are licensed, and Pantone limits who may publish them (since 2022, even Adobe’s apps need a paid Pantone Connect subscription to use them). Each Pantone colour is also a mixed ink rather than a CMYK or RGB value, so any conversion is an approximation. For official values and the nearest CMYK or RGB, use Pantone Connect or a printed Pantone guide.

Guides: Getting images ready for a website · Converting screen colours to CMYK for print

Print (CMYK)

Screen Print

Print shows the ink on the paper as closely as this screen can, with the paper as pure white. Some differences aren’t the press: your screen’s brightness, colour settings and range, the paper’s own tint, and the light a print is seen in all change what you see. Judge colour-critical work on a printed proof.

Shades

Tints (with white) and shades (with black)

Mix with another colour

Harmonies

Contrast

Large text, 24pxNormal text at 15px reads like this.

Click a shade, tint, blend or harmony to use it. To find the colours in a photo or logo, use Image Palette. Contrast follows WCAG 2 and ignores opacity.

Built with The third-party code and data this tool uses, and their licences

This tool runs on the following open-source work, copied onto this site and served from it:

Little CMS 2 2.20 CMYK through printing profiles
Copyright
Copyright (c) 2023 Marti Maria Saguer
Licence
MIT License
Source
github.com/mm2/Little-CMS
Notes
Built to WebAssembly with a small wrapper (wasm/lcms/ in the site's repository).
Tailwind CSS default colour palette 4.1.14 the nearest Tailwind colour and the Tailwind theme output
Copyright
Tailwind Labs, Inc.
Licence
MIT License
Source
github.com/tailwindlabs/tailwindcss
Notes
The 22 colour families in 11 steps, as OKLCH values from Tailwind's theme.css, copied into assets/js/images.js; no file of its own.
Printing profiles (ICC) for FOGRA39, FOGRA47, GRACoL 2013, SWOP 2013 and Japan Color 2011 CMYK
Copyright
Copyright X-Rite, Inc.; made available by VIGC (FOGRA39, FOGRA47), Idealliance (GRACoL, SWOP) and JPMA (Japan Color)
Licence
The profiles' own licences (may be shared without restriction; not altered or sold)
Source
registry.color.org/profile-registry/
Notes
From the ICC Profile Registry, unchanged, as their licences require. ECI's PSO Coated v3 (FOGRA51) isn't here, as its licence doesn't allow sharing it.

Every page also uses Montserrat (SIL Open Font License 1.1).
Everything the site uses is on Credits and licences.

Private: this tool runs in your browser. Nothing you type, paste or choose leaves this page.

Saved you a few minutes? Say thanks with a coffee.

Something wrong with this tool, or missing from it? Report a bug or suggest a feature.

↑ ↓ move↵ openesc close