Color Palette Generator — HSL Harmonies and CSS Variables

Developer Tools

Loading tool...

About This Tool

Generate 3, 5, 7 or 9 colors from a base color using six palette modes. Copy HEX values or a CSS custom-property block.

How to Use

  1. Select the base color, palette mode and number of colors.
  2. Click Generate to create the palette.
  3. Click a swatch to copy its HEX value, or copy all values.
  4. Use Export CSS to copy a :root block of custom properties.

Explore six palette modes

Choose 3, 5, 7 or 9 colors. Analogous mode spaces hues by 30 degrees around the base hue. Complementary mode combines the base hue and its 180-degree opposite with lightness variations. Triadic mode cycles through offsets of 0, 120 and 240 degrees; split complementary uses 0, 150 and 210. Monochromatic mode holds hue and saturation while spreading lightness from 20% to 80%.

Random and repeated generation

Random mode ignores the base color and samples hue, saturation and lightness within its chosen ranges. It uses ordinary pseudorandom numbers for visual exploration, not cryptography. Other modes are deterministic for the same inputs. At low saturation or extreme lightness, several swatches can coincide; the tool does not guarantee distinct colors or retain the exact base color in every mode.

Copy into a stylesheet

Export CSS copies variables named --color-1, --color-2 and so on inside :root; it does not download a file. The swatches use rounded RGB HEX values and display rounded HSL labels. These mathematical hue relationships are starting points, not proof of accessible contrast, perceptual uniformity, brand suitability or print accuracy. Check the actual text/background combinations before using a palette in an interface.

Frequently Asked Questions

Does Export CSS download a file?
No. It copies a :root block to the clipboard.
Does Random use my base color?
No. Random mode samples fresh HSL values independently.
Are all palettes accessible?
No. Contrast and readability are not tested by this generator.