Generateur de palettes

Generez des palettes de couleurs harmonieuses a partir d'une couleur de base. Exportez les codes hex instantanement.

7 colors
rgb(243, 231, 254)
hsl(271, 92%, 95%)
rgb(208, 162, 251)
hsl(271, 92%, 81%)
rgb(173, 93, 247)
hsl(271, 91%, 67%)
rgb(138, 24, 244)
hsl(271, 91%, 53%)
rgb(101, 9, 187)
hsl(271, 100%, 38%)
rgb(63, 6, 118)
hsl(271, 100%, 24%)
rgb(26, 2, 49)
hsl(271, 100%, 10%)
bg-slate-200bg-purple-400bg-purple-500bg-violet-500bg-indigo-500bg-slate-800bg-slate-900
text-slate-200text-purple-400text-purple-500text-violet-500text-indigo-500text-slate-800text-slate-900
border-slate-200border-purple-400border-purple-500border-violet-500border-indigo-500border-slate-800border-slate-900
#f3e7fe
#d0a2fb
#ad5df7
#8a18f4
#6509bb
#3f0676
#1a0231

Enter a base color and this generator computes a set of related colors using classic color-wheel relationships — complementary, analogous, triadic, split-complementary, and monochromatic — then hands you the hex codes ready to paste into CSS. Under the hood these schemes are just rotations of the hue channel in the HSL color model: a complementary color is the base hue plus 180 degrees, triadic colors sit at plus and minus 120 degrees, and analogous colors sit within roughly 30 degrees on either side. Working in HSL is what makes the math predictable, because you keep saturation and lightness fixed while only the hue moves around the wheel.

The reason this matters for real work is that eyeballing hex codes is unreliable. A value like #3B82F6 tells you nothing about its hue angle, so building a coherent scheme by hand means constant trial and error. A color scheme generator does the trigonometry for you and guarantees the relationships are exact, which is why the exported palette actually reads as harmonious rather than merely 'colors that happen to be near each other.'

Every swatch is copyable as a hex color, so the output drops straight into custom properties, a Tailwind config, an SVG fill, or a design token file. Because hex is the most portable format across CSS, canvas, and native platforms, you can move the same palette between a stylesheet and a Figma file without conversion friction.

Generating a palette step by step

  1. 1

    Pick your base color with the color picker or paste an existing hex value (for example #2563EB) into the input to seed the palette from a brand color you already use.

  2. 2

    Choose a harmony rule — complementary, analogous, triadic, split-complementary, or monochromatic — to control how the additional hues are derived from the base.

  3. 3

    Read the generated swatches; each shows its hex code, and monochromatic sets vary lightness and saturation rather than hue so you get tints and shades of one color.

  4. 4

    Click any swatch to copy its hex code to the clipboard, or copy the full set at once for pasting into your stylesheet or design tool.

  5. 5

    Adjust the base color and the palette recomputes live, so iterate until the contrast and mood match your target design.

Where this fits in a real workflow

  • Bootstrapping a design token set

    Start from one brand hue and generate accent, secondary, and neutral values to seed CSS custom properties or a Tailwind theme without hand-tuning each color.

  • Building UI states from one color

    Use a monochromatic scheme to produce hover, active, and disabled variants as tints and shades of a single button color, keeping the component visually consistent.

  • Data visualization and charts

    Triadic or analogous palettes give you distinguishable-yet-related series colors for graphs, so categories stay legible without clashing.

  • Rapid prototyping and mockups

    When you need a plausible color scheme in seconds for a demo or landing page, generate one from a base color and export the hex codes straight into the markup.

Practical notes and pitfalls

  • Harmony does not guarantee accessibility. Always verify text-on-background pairs against WCAG contrast ratios — 4.5:1 for normal text, 3:1 for large text — because two hues can be complementary and still fail.
  • Complementary schemes at full saturation can vibrate uncomfortably when placed edge to edge. Mute one side by lowering its saturation or use it only for small accents rather than large fills.
  • HSL lightness is not perceptual lightness. Two colors at the same HSL L value can look very different in brightness (yellow reads far lighter than blue), so judge tints and shades by eye, not by the number alone.
  • Keep hex codes uppercase and six-digit for consistency in your codebase, and remember modern CSS also accepts eight-digit hex (#RRGGBBAA) if you need to bake in alpha.
  • Store the generated colors as CSS custom properties (--color-primary: #2563EB) rather than scattering literals; it makes theming and dark-mode overrides a one-line change instead of a find-and-replace.

Common questions about color palettes

What is a complementary color scheme?+

A complementary scheme pairs a base color with the hue directly opposite it on the color wheel — 180 degrees away in HSL. The high contrast makes elements pop, which is useful for calls to action, but it can be harsh over large areas.

What is the difference between analogous and triadic palettes?+

Analogous palettes use hues within about 30 degrees of the base, giving a calm, cohesive look. Triadic palettes use three hues evenly spaced 120 degrees apart, which is more vibrant and balanced but higher contrast.

Why generate palettes in HSL instead of RGB or hex?+

HSL separates hue, saturation, and lightness, so you can rotate the hue to find harmonies while holding the other two constant. Doing the same in RGB or raw hex requires nonlinear math that is hard to reason about by hand.

How do I use the exported hex codes in CSS?+

Paste them into any color property, such as color: #2563EB or background: #2563EB. For maintainability, assign them to custom properties like --brand: #2563EB and reference them with var(--brand).

Are these palettes accessible for text?+

Not automatically. A generated palette optimizes for aesthetic harmony, not contrast, so you must check each foreground/background pair against WCAG minimums (4.5:1 for body text) using a contrast checker before shipping.

What does a monochromatic palette do differently?+

It keeps a single hue and varies only saturation and lightness to produce tints and shades. This is ideal for generating UI states — hover, pressed, disabled — from one source color while guaranteeing they belong together.