Sean L. YoungStudio tools
Step 1 · Plan

Colour Palette

Build a website's colours from one colour, a client's logo or photo, or a random roll. You get the full set a site needs, in light and dark, checked for readability and ready to paste into the site as code.

What it's for

A website needs more than a few nice colours. It needs a background, text that's easy to read on it, an accent for buttons and links, softer colours for lines and boxes, and a dark-mode version of all of them. Working those out by hand takes a long time, and it's easy to end up with grey text that's too faint or a button colour that's hard to read.

The Colour Palette does that work for you:

  • It builds a palette of colours that go together, from a single colour, from a client's logo or photo, or at random.
  • It turns the palette into the full set of colours a site uses, for both light and dark mode.
  • It shows them on a sample web page, so you see them working together rather than as swatches.
  • It checks every combination of text and background for readability.
  • It gives you the code to paste into the site.

Quick start

  1. Pick a starting point. Choose A colour and pick the client's main colour, or choose A logo or photo and drop in their logo.
  2. Look at the sample page. The On a website preview shows the colours in use. Switch it to Dark to check dark mode too.
  3. Adjust. Change, lock, add or remove colours in the strip until it feels right. Try a different harmony for a different mood.
  4. Check readability. Make sure the readability table shows Good or Excellent for everything.
  5. Copy the code. Under Use it on a site, pick the format you need and click Copy code.
  6. Keep it. Click Save palette, or Copy link to this palette to send it to the client.

The screen at a glance

Layout of the Colour Palette: the start bar along the top, the colour strip below it, then the website preview and readability table side by side, then the shades, then the code. A colourA logo or photoSurprise me #0d6b62 HarmonyOpposite colour Undo #0b2e2b#0d6b62#daede9#d9846a#fbf4f1 deep tealtealpale tealcoralwarm white TEXTACCENTSECOND COLOURBACKGROUND On a website Readability AaBody text13.1 : 1 AaLinks5.9 : 1 AaButton label6.4 : 1 Shades of each colour teal Use it on a site CSS variablesTailwind SCSS JSON Plain list Copy code 1 2 3 4 5 6
The Colour Palette, built from one teal with the "Opposite colour" harmony.
  1. Start bar. Choose how to build the palette, and undo changes.
  2. The palette. Your colours, with their codes, names and the job each one does on the site.
  3. On a website. A sample page in your colours, in light or dark.
  4. Readability. Whether each kind of text is easy to read on its background.
  5. Shades. Ten lighter and darker versions of each colour, which you can try on the sample page.
  6. Use it on a site. The code to paste into the site, plus saving and sharing.

On a narrower screen the preview and readability table sit one above the other. On a phone the colour strip runs down the page instead of across it.

Three ways to start

The buttons at the left of the start bar choose where the palette comes from.

A colour

Start from one colour, usually the client's main brand colour. Click the colour square to pick one, or type its hex code (such as #0d6b62) into the box next to it. Short codes like #0a6 work too.

Then choose a harmony, which decides how the other colours relate to yours:

HarmonyWhat you getFeels
Shades of one colourLighter and darker versions of your colour only.Calm, simple, very on-brand.
Neighbouring coloursColours next to yours on the colour wheel, such as teal with green and blue.Soft and natural.
Opposite colourYour colour plus the colour across the wheel from it, such as teal with coral. This is the starting choice.Lively, with a clear highlight colour.
Split oppositeYour colour plus the two colours either side of its opposite.Lively but less stark than opposite.
Three-wayThree colours evenly spaced around the wheel.Bright and playful.
Four-wayFour colours evenly spaced around the wheel.Bold and varied. Best used sparingly.

Most harmonies also include a very dark and a very light colour, for text and backgrounds. If a palette has none, the tool makes suitable ones for the site anyway (see Which colour does which job). The palette updates as soon as you change the colour or the harmony.

A logo or photo

Drop a logo or photo onto the box, or click the box to choose a file. The tool finds the five main colours in the image, favouring the colourful ones over large areas of grey or white, and lines them up from darkest to lightest. A small preview of the image appears in the box, and you can drop another image to try again.

You can also drop an image anywhere on the page, or paste one with Ctrl+V (⌘+V on a Mac). The tool switches to this mode by itself.

Tip

A logo usually gives you the brand colours. A photo of the client's shop, products or work gives you colours that feel like the business. Try both.

Surprise me

Click New palette, or press the Space bar, for a random palette in a random harmony. Keep pressing until you see something you like. Lock the colours you want to keep (see below) and the rest change around them.

The space bar works in any of the three modes, as long as you're not typing in a box.

Undo

Undo, or Ctrl+Z, takes back the last change: a new palette, an added, moved or removed colour, a loaded palette, and so on. It remembers your last 60 changes, until you close or reload the page.

Working with the colours

The big strip under the start bar is your palette: up to eight colours. Each colour shows:

  • Its hex code. Click it to copy it.
  • Its name. The tool names each colour for you, such as "deep teal" or "warm white". Click the name to type your own, such as the client's name for it. Clear the name to go back to the automatic one.
  • Its job, if it has one, in small capitals at the top: Accent, Second colour, Background or Text. See Which colour does which job.

Point at a colour to show its buttons. On a phone or tablet they're always showing.

  • Lock (padlock): keeps this colour when you make a new palette with A colour or Surprise me. Click again to unlock.
  • Change (paint palette): opens a colour picker to adjust or replace this colour.
  • Move left (arrow): swaps this colour with the one before it.
  • Remove (×): takes this colour out. A palette always keeps at least two colours.

The + at the end of the strip adds a colour related to the last one. Change it to whatever you need.

Good to know

Locks don't apply to A logo or photo. Reading a new image always replaces the whole palette. Use Undo to get your previous one back.

The website preview

On a website shows a short sample page, with a menu, a heading, buttons, a highlight label and cards, all in your colours. It's the quickest way to see whether the palette works on an actual page, rather than just as a row of swatches. It updates instantly with every change.

  • Light and Dark switch the sample between the light and dark versions of the site's colours. You don't design the dark version yourself: the tool works it out from your palette.
  • The vision menu shows the sample as someone with a common colour-vision difference would see it: red-blind, green-blind, blue-blind, or with no colour at all. Use it to check that buttons and highlights still stand out.
Tip

Check the No colour (greyscale) view. If the button disappears into the background there, it's relying on colour alone to stand out, and a darker or lighter accent will help everyone.

Which colour does which job

A site uses four main colours, and the tool picks a colour from the palette for each one:

JobUsed forPicked automatically as
AccentButtons, links and key highlights.The colour you started from, if it's colourful enough. Otherwise the most colourful mid-tone colour.
Second colourLabels, icons and small highlights.The most colourful colour that's clearly different from the accent.
BackgroundThe page itself.A very light, nearly neutral colour from the palette. If there isn't one, a soft off-white tinted with the accent.
TextHeadings and body text.A very dark, nearly neutral colour from the palette. If there isn't one, a near-black tinted with the accent.

To choose for yourself, open Choose which colour does which job under the preview and pick a colour for any job. Set it back to Automatic to let the tool decide again.

The colours it works out for you

From those four, the tool works out the rest of the set a site needs, in light and dark: a slightly different surface colour for cards, a softer colour for less important text, a colour for lines and borders, a darker accent for when a button is hovered over, a pale tint of the accent for highlighted areas, and the right text colour to put on the accent and second colours.

Along the way it quietly fixes readability problems. If the accent is too light for link text on the background, for example, it uses a darker version of the accent for links. Your palette colours don't change. Only the site colours made from them are adjusted.

Readability

The readability table checks each kind of text against what it sits on: body text on the background and on cards, softer text, links, button labels, and the second colour. Switch between Light and Dark at the top of the table to check both.

Each line shows a small sample, the contrast between the two colours, and a verdict. Contrast runs from 1 : 1 (the same colour, unreadable) to 21 : 1 (black on white).

VerdictContrastMeans
Excellent7 : 1 or moreEasy for almost everyone to read.
Good4.5 : 1 or moreMeets the usual guideline for body text.
Large text only3 : 1 or moreFine for big headings and bold buttons, too faint for paragraphs. For lines that are always large, this shows as "Good for large text" instead.
Hard to readUnder 3 : 1Change one of the colours.

These follow WCAG AA, the guideline most accessibility rules are based on.

If something is hard to read

Try a darker or lighter shade of the colour (see the next section), or pick a different colour for that job under "Choose which colour does which job".

Shades of each colour

Each colour in the palette gets a row of ten shades, from 50 (palest) to 900 (darkest). The outlined shade is the one closest to your original colour. These numbers are the same system Tailwind and many design kits use, so a designer or developer will recognise them.

Trying a shade

Click any shade to try it in place of the original. The sample page, the readability table, the strip and the code all update straight away, so you can see how a slightly lighter or darker version changes the whole page. The shade you're trying gets a tick, and a bar above the shades shows what's being tried, with three buttons:

  • Keep it makes the change permanent. If the colour had a job on the page (accent, background and so on), it keeps that job.
  • Go back puts the original colour back. Clicking the ticked shade again, or Ctrl+Z, does the same.
  • Copy copies the shade's hex code.

While you're trying a shade, the colour keeps its name, so the names in the code don't change halfway through. You can try one shade at a time; trying a shade of a different colour puts the first one back.

If the colour you're trying a shade of doesn't have a job on the sample page, you wouldn't see any change. So the bar shows a menu to display it as the accent, background, second colour or text while you try it. Keeping a shade of one of these colours only changes the colour, not which colour does which job.

Using it on a site

Choose the format that suits the site, then click Copy code.

TabWhat it isUse it when
CSS variablesYour palette colours, then the site colours for light mode and dark mode, and a few example lines showing how to use them.Almost always. It works on any website.
TailwindSettings for a Tailwind config file.The site is built with Tailwind. Paste the CSS variables into the stylesheet as well, since these settings point to them.
SCSSThe same colours as SCSS variables and maps.The site's styles are written in SCSS.
JSONThe same colours as data.Another tool or program needs to read them.
Plain listEach colour's name, hex code and RGB values.For a client, a printer or a brand guide.

Tick Include all shades to add all ten shades of every colour to the code, named like --teal-300.

How dark mode works in the CSS

The CSS follows the visitor's device: if their phone or computer is set to dark mode, the site uses the dark colours automatically. If the site has its own light/dark switch, set data-theme="dark" or data-theme="light" on the page's <html> tag and that choice wins. This is how the Studio tools themselves work.

The names in the code

The variables are named after the colours, so "deep teal" becomes --deep-teal. Rename the colours in the strip before copying if you'd like different names, such as the client's own names for their brand colours.

Saving and sharing

Save palette

Save palette keeps the palette in this browser, named after its accent colour and today's date, such as "Teal · Nov 25". Saved palettes appear under Saved palettes at the bottom. Click one to load it (Undo brings back the palette you had before), or click its × to delete it. The 40 most recent are kept.

Deleting is immediate

Clicking × on a saved palette deletes it straight away, without asking.

Copy link to this palette

Copy link to this palette copies a web address with the colours built into it. Anyone who opens it sees the same palette, so it's an easy way to send a few options to a client. Custom colour names and job choices aren't included in the link.

The address in your browser's address bar updates as you work, too. So a bookmark, or simply reloading the page, brings back the palette you had.

Keyboard shortcuts

PressTo
SpaceMake a new random palette. Locked colours stay.
Ctrl+Z (⌘+Z on a Mac)Undo the last change.
Ctrl+V (⌘+V)Paste a copied image to build a palette from it.
EnterFinish renaming a colour.

These work when you're not typing in a box. Every button can be reached with Tab and pressed with Enter or Space.

Questions

The button colour in the code isn't exactly the colour I picked.

If a colour wasn't readable enough for its job, the tool uses an adjusted version for the site colours, such as a darker accent for link text. Your original is still in the palette section at the top of the code. To use it exactly, check the readability table first, since changing it back may make text hard to read.

Why did the space bar click a button instead of making a new palette?

When a button has keyboard focus, Space presses that button, as it does everywhere on the web. Click an empty part of the page first, then press Space.

The colours from a logo don't look quite right.

Logos with only one or two colours don't have five to find, so some will be close relatives of each other. Change or remove the extras, or start from A colour with the logo's main colour instead.

Can the client see the palette without the Studio?

Send them the link from "Copy link to this palette". It opens the Colour Palette with their colours, so they can look at the sample page in light and dark.

Where are my saved palettes kept?

In this browser on this computer. They won't appear in a different browser or on another computer. To move one, open it and copy its link, then open the link on the other computer and save it there.

Is my logo uploaded anywhere?

No. The image is read in your browser and never leaves your computer.