// free tool - color palette generator

Color Palette Generator Free color scheme generator

This free color palette generator builds a palette from one base color, a color harmony or a photo. Lock the colors you like, press Space to shuffle the rest, check WCAG contrast for every pair and export to CSS, Tailwind, SCSS, JSON or PNG.

  • Free - no sign-up
  • Runs in your browser
  • Palette from image
  • WCAG contrast check

Build your palette

Pick a base color and a harmony. Everything runs on this page; nothing is sent anywhere.

Harmony
Starter palettes
Palette from an image
Image used for the palette

Your image is read on this device only. It is never uploaded.

Saved palettes

    Nothing saved yet. Use Save to keep a palette in this browser.

    palette.css 5 colors

    Lock the colors you want to keep, then press Space or Generate.

    
                

    Contrast checker

    WCAG 2.x contrast ratio for any two colors. Type a hex code or tap a palette color.

    contrast-check.txt -

    Large text, 24px bold

    Normal body text at 16px. The quick brown fox jumps over the lazy dog.

    -

      Every color combination in this palette

      Rows are text colors, columns are backgrounds. The last row shows whether black or white text reads better on each swatch.

      Go past the palette

      A palette is five hex codes. A brand is how you use them.

      These AI skills plug into Claude, ChatGPT or any AI chat and help you turn colors into a brand system, an interface and a product people can actually read.

      How to use this color palette generator

      A color palette generator saves you from guessing. Instead of picking five colors one by one and hoping they work together, you start from one color you already like and let a rule from color theory place the others. This tool does that, then goes two steps further: it tells you which combinations are readable, and it hands you the code.

      1. Type or pick a base color. It accepts #3D8BFF, 3d8bff, the short form #38f or rgb(61, 139, 255).
      2. Choose a harmony and the number of colors, from 3 to 8.
      3. Lock the swatches you want to keep and press Space (or Generate) to shuffle the rest. Undo brings back the previous version.
      4. Click any hex code to copy it, or use the pencil to fine-tune a single swatch.
      5. Check the contrast table, then export as CSS variables, Tailwind, SCSS, JSON or a PNG image, or copy a link that reopens the same palette.

      Color harmonies, explained simply

      Every harmony is a pattern of positions on the color wheel. That is all a color scheme generator really does: it rotates the hue of your base color by fixed angles and keeps the saturation and lightness close to the original.

      • Analogous - neighbors on the wheel, about 30 degrees apart. Calm and natural; works well for backgrounds and illustrations.
      • Complementary - the color opposite your base, 180 degrees away. Maximum contrast in hue, so use the second color sparingly for calls to action.
      • Split complementary - instead of the exact opposite, the two colors on either side of it (150 and 210 degrees). Almost as lively as complementary, easier to balance.
      • Triadic - three colors 120 degrees apart. Bright and playful; let one color lead and keep the other two small.
      • Tetradic - four colors in a square (90 degrees apart) or a rectangle (60 and 180 degrees). Rich, but needs a clear dominant color.
      • Monochrome and tints + shades - one hue in several lightness steps. The safest choice for interfaces, and the basis for most design system scales.

      The 60-30-10 rule

      Interior designers have used the 60-30-10 rule for decades and it works on screens too. About 60 percent of a layout is a dominant, usually quiet color (backgrounds, large surfaces). About 30 percent is a secondary color (cards, sections, navigation). The last 10 percent is an accent reserved for what you want people to notice: buttons, links, highlights. A five-color palette maps neatly to this: one or two neutrals for the 60, one supporting color for the 30, one accent for the 10, and one dark color for text.

      Building a UI palette that holds up

      A good color combination generator gets you a starting point, not a finished design system. To turn a palette into something you can build with:

      • Give every color a role. Background, surface, text, primary, accent. Switch the export names to roles to start from that structure.
      • Add a neutral. Most harmonies are colorful. Real interfaces need a near-white and a near-black with a hint of your brand hue.
      • Plan for states. Hover, focus, disabled and error each need a color. Tints + shades mode gives you lighter and darker steps of one hue for this.
      • Do not rely on color alone. Pair color with text, icons or patterns so people with color vision deficiency get the same message.

      Check contrast before you ship

      The contrast checker uses the WCAG 2.x formula: it converts each color to relative luminance and divides the lighter one plus 0.05 by the darker one plus 0.05. The result runs from 1:1 (no contrast) to 21:1 (black on white). The thresholds to remember:

      • 4.5:1 for normal text to pass level AA, and 7:1 for AAA.
      • 3:1 for large text (24px regular or about 18.7px bold) at AA, and 4.5:1 at AAA.
      • 3:1 for user interface components and meaningful graphics, such as input borders and icons.

      The table under the checker scores every pair in your palette at once, so you can see which colors are safe for text and which should stay decorative. For each swatch it also shows whether black or white text has the higher ratio.

      Getting a palette from a photo

      Upload, drop or paste an image and the tool shrinks it, then groups similar pixels with k-means clustering in the CIELAB color space, which is closer to how people perceive color differences than plain RGB. Each cluster becomes one swatch, sorted by how much of the image it covers. The image is processed in your browser and never leaves your device. Locked swatches stay in place, so you can keep your brand color and fill the rest from a mood photo.

      Using the palette in code

      CSS custom properties work everywhere: paste the :root block into your stylesheet and use var(--color-1). The Tailwind v3 export goes into theme.extend.colors in your config; the Tailwind v4 export is an @theme block for your main CSS file. SCSS variables and JSON are there for older build setups and design token tools. The PNG export is handy for mood boards, client decks and briefs.

      Working on a whole brand, not only its colors? Try the free business name generator, the tagline generator and the brand story generator, or browse every tool in the free AI generators hub.

      FAQ

      Is this color palette generator free?

      Yes. There is no sign-up and no limit on palettes. Everything runs in your browser, and saved palettes are stored only in your own browser, where you can delete them at any time.

      Is my image uploaded when I extract colors from it?

      No. The image is drawn onto a canvas inside this page and the colors are calculated on your device. Nothing is sent to our servers or anyone else.

      How is the contrast ratio calculated?

      With the WCAG 2.x formula: each color is converted to relative luminance, then the ratio is (lighter + 0.05) / (darker + 0.05). AA needs 4.5:1 for normal text and 3:1 for large text and UI components. AAA needs 7:1 and 4.5:1.

      How do I use the palette in Tailwind CSS?

      Pick Tailwind v3 to get a theme.extend.colors snippet for tailwind.config.js, or Tailwind v4 to get an @theme block for your CSS file. Choose role names or color names for the keys if you prefer them to color-1, color-2.

      How do I share or save a palette?

      Copy link puts the colors in the page address, so anyone who opens it sees the same palette. Save keeps it in a list in this browser. You can also download a PNG image of the swatches.