SaafKit

Convert a colour and check its contrast

Paste a colour in any format and get the others back, plus the contrast ratio against white and black with the accessibility grade, which is the part that usually matters.

  • Runs in your browser
  • Nothing uploaded
  • No account
  • No watermark
  • Free

How to colour converter

  1. Paste a colour: a hex code, an RGB or HSL value, or a CSS colour name.
  2. Read off the format you need.
  3. Check the contrast grades before you put text on it.

The contrast part is the useful part

Contrast ratio compares the brightness of two colours and runs from 1 to 1, meaning identical, up to 21 to 1 for black on white. The accessibility thresholds everyone works to come from WCAG:

  • 4.5 to 1 for normal body text. This is AA, and it is the level most organisations treat as required.
  • 3 to 1 for large text, meaning roughly 24 pixels, or 19 pixels when bold. Also the threshold for icons and interface boundaries.
  • 7 to 1 for AA A, a higher bar worth meeting for long reading.

The brand colour that fails most often is a mid tone, and mid toned blues and oranges fail most of all. A colour can look perfectly readable to you on a bright laptop and be genuinely hard work on a phone outdoors, which is what the ratio is there to catch.

Why HSL is worth using

Hex and RGB describe a colour in terms a screen understands. HSL describes it in terms a person understands: hue, how saturated it is, how light it is.

That makes HSL far better for building a palette. Take a hue, hold it still, and change the lightness, and you get a set of tints and shades that genuinely belong together. Doing the same in hex means guessing. If you want a hover state slightly darker than your button, dropping the lightness by eight percent in HSL does it predictably.

About the CMYK figure

The CMYK values here are a straightforward arithmetic conversion, which is enough for a rough idea. Real print conversion depends on the press, the paper and the colour profile, and a printer will convert properly using the profile for the job. Do not hand these numbers to a printer and expect an exact match, and never rely on a screen for a print colour decision.

Questions

What contrast ratio do I need?

4.5 to 1 for normal text and 3 to 1 for large text, to meet WCAG AA. 7 to 1 meets the higher AAA level.

How do I convert hex to RGB?

Paste the hex code in and the RGB value appears with the others. A hex code is just three pairs of hexadecimal digits for red, green and blue.

Can I paste a CSS colour name?

Yes. Any name your browser understands works, including the unusual ones such as rebeccapurple and papayawhip.

Are the CMYK values accurate for printing?

They are a rough arithmetic conversion. Real print colour depends on the press, paper and colour profile, so let your printer convert using the profile for the job.

The rest of the toolkit

Every one of these runs on your own device. Nothing is uploaded, and there is no counter anywhere.

Image tools

Remove a backgroundCut the background out of any photo and get a transparent PNG.Compress an imageDrop a photo in, slide the quality until the saving looks right, and download.Resize an imageSet a width and the height follows, or lock both to a size something else demands and choose whether the image fills the box or fits inside it.Convert a formatPick the format the next tool in your workflow expects.Crop an imageDrag across the image to choose the area you want.Circle cropMake a round profile picture with a genuinely transparent corner, so it sits properly on any background rather than showing a white square.Rotate or flipTurn a photo that came out sideways, straighten a horizon that is slightly off, or mirror an image so a subject faces the other way.Add a watermarkPut your name, studio or web address onto an image before you send a proof out.Images to PDFDrop in photos or scans and get one PDF with a page for each.Favicon generatorOne image in, a zip out with every size a browser asks for, the legacy ICO file, the Apple touch icon, a web manifest and the HTML to paste into your head.Palette from an imageGet the colours that actually dominate a photograph, ordered by how much of the image they cover, and copy any of them in the format you need.Image to Base64Turn a small image into text you can paste straight into CSS, HTML, an email template or a JSON payload, with no separate file to host.Passport photoChoose the country, frame your face in the box, and get a correctly sized photo at print resolution.Split an imageCut one picture into equal tiles.Add a borderPut a frame around an image.

Text and generators