Skip to content
EveryFix

Color Palette Generator

The Color Palette Generator creates balanced color palettes you can use for websites, brands, and designs. Lock the colors you love, regenerate the rest, and copy any hex code with a click — all in your browser. Each swatch gets an independently random hue (0–359°) — the five colors are not built from a true color-theory relationship like complementary or analogous hue offsets, since every swatch's hue is picked on its own with no reference to the others. What keeps the palette from looking jarring is that saturation is always randomized within 50–80% and lightness within 45–68% before being converted from HSL to hex using the standard CSS/W3C HSL-to-RGB formula, which avoids neon-saturated or muddy-dark extremes even though hue is unconstrained. The hex label on each swatch also switches between white and dark text automatically, based on a perceived-brightness calculation (0.299×R + 0.587×G + 0.114×B, normalized to 0–1) — light backgrounds above a 0.6 threshold get dark text, everything else gets white.

Beginner⏱ 1 minuteUpdated 2026-07-08

Click any color to copy its hex code, tap the lock to keep a color while you regenerate the rest, and hit Generate for a fresh palette. Everything runs in your browser.

How This Tool Works

A palette appears automatically. Click any swatch to copy its hex code, tap the lock icon to keep a color you like, and press Generate to refresh the unlocked colors until you find a combination you love.

Formula & Method

Each color is generated in HSL with a random hue and balanced saturation and lightness, then converted to a hex code — an approach that produces more harmonious, usable colors than picking raw RGB values at random.

Example Calculation

Press Generate and five random swatches appear — for example, a hue-210 blue at 65% saturation and 55% lightness renders as #428CD7 with white label text, while a hue-60 yellow at 75% saturation and 65% lightness renders as #E9E963 with dark label text (its brightness crosses the 0.6 threshold). Click the blue swatch to copy "#428CD7" to your clipboard, then tap its lock icon — pressing Generate again leaves that swatch locked at #428CD7 while the other four swatches get entirely new random hues, letting you build the rest of the palette around the one color you kept.

Please note: This calculator provides estimates for general informational purposes only. Results may not be accurate for every situation — use your judgment and consult a relevant professional when it matters.

About the Color Palette Generator

Choosing colors is one of the slowest parts of any design project, mostly because the possibilities are so open-ended. A palette generator narrows the field by handing you a handful of candidates to react to. This one produces five swatches at a time. Each swatch shows its hex code, such as #428CD7, which is the six-digit notation that web design tools, style sheets, presentation software, and image editors all understand. Click a swatch to copy its code, lock the ones you want to keep, and press Generate until the rest of the set works around them.

The colors are built in the HSL model, which describes a color by hue (the position on the color wheel, 0 to 359 degrees), saturation (how vivid), and lightness (how light or dark). For each swatch the tool picks a whole-number hue anywhere on the wheel, a saturation between 50 and 80 percent, and a lightness between 45 and 68 percent, then converts the result to hex. That works out to 267,840 possible combinations for each swatch. The limited saturation and lightness ranges are what keep results clear of neon, muddy, and near-black or near-white extremes.

It is useful to know what the generator does not do. Each hue is chosen independently, so the five colors are not constructed as complementary, analogous, or triadic schemes, and a palette can include several similar hues or an unlucky clash. Think of it as a source of inspiration and a sketchpad, not an automatic color theorist. The most productive way to use it is to generate quickly, lock what appeals to you, and let the remaining slots keep changing until the group feels balanced.

When to Use It

Exploring a brand direction

A founder with no brand colors yet generates dozens of palettes in a few minutes, locking a swatch that feels right, such as a deep teal. Pressing Generate repeatedly shows how other hues look beside it, and the hex codes of the best combination are copied into a style guide or a design tool.

Theming a website or app

A developer building a small project needs a primary, a secondary, and a few accent colors fast. They generate a palette, copy all five codes at once, and paste them into CSS variables. Before committing, they test text readability against each color, since the tool does not check contrast for them.

Styling slides or a poster

A teacher or club organizer wants a presentation that looks coordinated without hiring a designer. They lock one color that matches the organization's logo, generate until the remaining four feel compatible, and apply the colors consistently to titles, shapes, and charts across every slide.

Creative and craft projects

An illustrator, knitter, or interior hobbyist uses the swatches as a prompt: a palette for a digital painting, a color scheme for a blanket, or an idea for painting a room. The hex values give a precise reference to carry into a drawing program or to compare against physical paint and yarn samples.

How to Use It, Step by Step

  1. When the page loads, a palette of five swatches is already displayed side by side. On a phone they stack vertically. Each swatch shows its hex code at the bottom of the color block.
  2. Click or tap any swatch to copy its hex code to the clipboard. The code briefly changes to 'Copied!' for a moment, then returns to normal. Paste it wherever you need the color.
  3. Click the padlock at the top right of a swatch to lock it. The icon changes from open to closed. Locked colors remain unchanged when you regenerate, and clicking the padlock again unlocks them.
  4. Press the 'Generate palette' button to refresh every unlocked swatch with a new random color. Repeat as many times as you like, locking more swatches as you find ones you want to keep.
  5. If you lock all five swatches, the Generate button has nothing to change. Unlock at least one swatch before pressing it again if you want new colors.
  6. When you have a combination you like, press 'Copy all hex codes'. All five codes are copied in a single line separated by commas, in order from left to right or top to bottom.
  7. Paste the list into a notes file, a style sheet, or a message to a teammate right away. The tool keeps no history, so once you generate again, any unlocked colors from the earlier palette are gone.
  8. Before adopting the palette, check how your actual text and backgrounds look together. The labels on the swatches are only a rough guide to readability and are not a contrast test.

Understanding Your Results

Each swatch gives you one piece of information you can act on: its hex code. A code like #CF3C17 is three pairs of hexadecimal digits for red, green, and blue, each pair running from 00 to FF. Most design software lets you paste it directly into a color field. The tool outputs uppercase codes with a leading hash and no transparency value, which is what browsers and style sheets expect for solid colors.

The code's text color on each swatch is chosen by a simple brightness formula that weights red, green, and blue by how bright the eye perceives them. Above a brightness of 0.6 on a 0 to 1 scale the label turns dark, otherwise it is white. This helps you read the code, but it is not a guarantee of accessible text. For instance, the generator can produce #33CC33 with a white label, yet dark text has a contrast ratio of about 8.4 to 1 on that green while white text only reaches about 2.1.

Judge a palette as a group. Look for variety in lightness, since five colors of identical brightness look flat and make hierarchy difficult. Check that at least one color is clearly darker or lighter than the others for text and backgrounds. The ranges also tell you what is missing: no pure white, black, or gray will appear, and no pale pastels or very deep shades, so plan to add neutrals yourself.

More Worked Examples

Locking a blue and testing text on it

Scenario: A generated swatch comes out as #428CD7, which comes from hue 210, saturation 65 percent, and lightness 55 percent. You lock it and press Generate.

The locked swatch stays at #428CD7 while the other four receive new random colors. The tool puts a white label on it because its brightness is 0.496, below the 0.6 threshold. Checking with the standard contrast formula, white text on this blue has a ratio of about 3.5 to 1, while dark text (#15161D) reaches about 5.1 to 1. Web guidelines ask for 4.5 to 1 for normal body text, so the dark text is the safer choice.

How the label color rule behaves

Scenario: You compare two generated swatches: a yellow, #E9E963 (hue 60, saturation 75, lightness 65), and a green, #33CC33 (hue 120, saturation 60, lightness 50).

The yellow has a brightness of 0.854, well above 0.6, so its label is dark, and the contrast against dark text is about 14 to 1, which is excellent. The green has a brightness of 0.552, just under the threshold, so the tool uses a white label even though white on this green is only about 2.1 to 1 and dark text would give about 8.4 to 1. The rule is a convenience, not a test of readability.

The edges of the generator's range

Scenario: You think about the strongest and softest red the tool can make, holding hue at 0 and using the limits of 80 percent saturation at 45 percent lightness, and 50 percent saturation at 68 percent lightness.

The most vivid, darkest red works out to #CF1717, with a brightness of 0.306, so it gets a white label. The softest, lightest red is #D68585, with a brightness of 0.617, so it gets a dark label. Every red the tool makes falls between those extremes. That is why you never see neon colors, pastels, or near-black shades, and why you must add your own white, off-white, and charcoal for backgrounds and text.

Tips for Better Results

  • Use the 60-30-10 guideline as a starting point: let one color dominate about 60 percent of a design, a second cover roughly 30 percent, and keep the strongest accent for about 10 percent. Assign roles to the swatches deliberately instead of by their order on screen.
  • Add neutrals yourself. Because the tool never generates white, black, or gray, pair the palette with an off-white background and a dark gray for text, which usually makes the saturated colors look more refined.
  • Check contrast before using a color for text. Normal body text is recommended to reach 4.5 to 1 against its background, and large text or interface outlines 3 to 1. An online contrast checker takes the two hex codes and gives you the ratio instantly.
  • Do not rely on color alone to carry meaning. A noticeable share of people have trouble telling certain reds, greens, and browns apart, so pair color with labels, icons, or patterns for status, charts, and warnings.
  • Copy the hex codes before you press Generate. The tool keeps no history and has no undo, so a combination you liked is lost forever once the unlocked swatches refresh.
  • Narrow a palette by locking progressively. Start by locking the first color you love, then lock a second that works with it, and keep going. This builds a set one decision at a time instead of hoping for five good colors in a single roll.

Common Mistakes to Avoid

  • Expecting a harmonious scheme by design. The hues are independent, so complementary or analogous relationships appear only by chance, and you may need to regenerate or swap colors to avoid a clash.
  • Trusting the white or dark swatch label as a contrast check. It is a quick brightness rule, so measure the actual ratio before using a color as a background for body text.
  • Locking every swatch and then wondering why Generate does nothing. With no unlocked colors there is nothing to change, so unlock at least one.
  • Using all five saturated colors at equal weight. A design needs a clear hierarchy, so choose one or two leads and use the others sparingly as accents.
  • Forgetting how colors differ on other screens and in print. Hex values are screen colors, and a printer or a different display may render them noticeably duller or brighter, so check a proof.

Assumptions and Limits

  • Colors are built from independent random hues with saturation between 50 and 80 percent and lightness between 45 and 68 percent, then converted to hex using the standard HSL to RGB formula. Any resemblance to a color theory scheme is coincidence.
  • The tool always generates five swatches, outputs only six-digit hex values, and has no input for entering your own color, no history, and no export beyond copying text to your clipboard.
  • The label rule uses a brightness formula of 0.299 red plus 0.587 green plus 0.114 blue, and the quoted contrast ratios here use the WCAG relative luminance method. They are different measurements and can disagree about which text color is more readable.
  • Hex codes describe colors on a screen. Brand-critical or printed work should be checked against physical samples, and accessibility requirements for a product or organization should be verified with the relevant guidelines.

Key Terms

Hex code
A six-digit base-16 notation for a screen color, such as #428CD7. The three pairs of digits give the red, green, and blue amounts.
Hue
The basic color family, measured as an angle around the color wheel from 0 to 359 degrees. Red is near 0, green near 120, and blue near 240.
Saturation
How intense or vivid a color is. Low saturation moves toward gray, while high saturation looks bold. This tool keeps it between 50 and 80 percent.
Lightness
How light or dark a color is, from black at 0 percent to white at 100. This tool keeps lightness between 45 and 68 percent.
Contrast ratio
A measure of the difference in brightness between two colors, from 1 to 1 for identical colors up to 21 to 1 for black on white. It determines readability.
Color harmony
A set of relationships between hues, such as complementary or analogous, that tend to look pleasing together. This generator does not enforce them.

Frequently Asked Questions

How do I keep a color I like?+

Tap the lock icon on that swatch. Locked colors stay fixed while Generate refreshes only the unlocked ones.

Can I copy the hex codes?+

Yes — click any swatch to copy its hex code, or use “Copy all hex codes” to grab the whole palette at once.

Are the palettes random?+

They use balanced saturation and lightness with a random hue, which keeps the colors harmonious and usable rather than jarring.

Does it generate a real color scheme (complementary, analogous, etc.), or are the hues unrelated?+

The hues are unrelated — each of the five swatches picks its own random hue independently, with no complementary, analogous, or triadic relationship enforced between them. The only constraint tying the palette together is that saturation (50–80%) and lightness (45–68%) are kept in a consistent, moderate range across all swatches, which is what keeps the results looking intentional rather than random RGB noise.

How does it decide whether a swatch's hex code shows in white or dark text?+

It calculates the swatch's perceived brightness from its red, green, and blue values (weighted 0.299/0.587/0.114, which roughly matches how the eye perceives each channel) and switches to dark text automatically once that brightness crosses 60% — so pale colors like yellow get dark labels and darker colors get white labels without you having to pick a text color yourself.

What does a hex color code mean?+

It is a compact way to write a color for screens. After the hash sign come six hexadecimal digits, two each for red, green, and blue, running from 00 (none) to FF (full). So #FF0000 is pure red and #000000 is black. The tool's colors look like #428CD7, where 42 is red, 8C is green, and D7 is blue. Most design software accepts them directly.

How many colors should a palette have?+

Five is a comfortable working size, which is why the tool shows five, but real designs usually rely on fewer. A common approach is one dominant color, a supporting color, and an accent, plus neutrals for backgrounds and text. You can always create tints and shades of a color rather than adding entirely new hues, which keeps the result cohesive.

Can I build a palette around a specific color I already have?+

Not directly, because the tool has no field for entering a hex code. It generates random colors, and you lock the ones you like. The practical approach is to keep pressing Generate until a swatch close to your target appears, lock it, and refresh the rest. For an exact brand color, use it alongside the generated swatches in your design software.

How can I tell whether text is readable on a color?+

Calculate the contrast ratio between the text color and the background. Accessibility guidelines recommend at least 4.5 to 1 for normal text and 3 to 1 for large text, and free online contrast checkers will compute it from two hex codes. Looking at the swatch is not enough, since the eye can be fooled by surrounding colors and screen brightness.

Why do I never see white, black, or pastel colors?+

The generator limits saturation to 50 through 80 percent and lightness to 45 through 68 percent. Pure white and black sit at the extreme ends of lightness, grays have no saturation, and pastels are lighter than the range allows. These limits keep the results lively but consistent. Add your own neutrals and tints to complete a usable palette.

Found this useful? Share it

Help someone else out — or link to it from your own site.

Link to this tool

Writing about color palette generator? Paste this on your site to link here.

<a href="https://everyfix.net/tools/color-palette-generator/">Color Palette Generator</a> by <a href="https://everyfix.net">EveryFix</a>