The tool you need, ready to use

Random Palette Generator

Every time you press New palette or the Space key, a combination of 3 to 15 colors appears. Lock the colors you like with the padlock and only the rest are redrawn, in one of four modes: Random, Harmony, Pastel and Vivid. Harmony, Pastel and Vivid draw in OKLCH, a color space matched to the lightness people perceive. The colors are applied to a sample screen at once, and the tool judges whether body-text contrast clears 4.5:1, the WCAG 2.2 threshold.

Last updated 2026-10-12All math stays in your browser

Mode

You can also press Space to draw a new palette while it is on screen. A color whose lock is pressed stays as it is and only the rest change, and Harmony mode picks matching colors based on the locked one. Click a color card to copy its HEX code.

    Try it on a sample screen

      Roles are assigned automatically by lightness and chroma. Verdicts follow WCAG 2.2 (4.5:1 for body text, 3:1 for graphics and large text).

      OKLCH color wheel (angle = hue, farther out = more chroma)
      Lightness order (OKLCH L)

      In Harmony mode the dots spread at the rule's angles (180° for complementary, 120° for triadic), and the lightness bar shows whether the colors differ enough in lightness to work as text and background.

      Last updated 2026-10-12Your inputs are not stored

      ROBERIN standardThe tool you need,
      ready to use.
      • Clear at a glanceInputs and results sit where you expect them.
      • Result firstThe key number comes first; the working only when you need it.
      • Ask lessNo sign-up and no unnecessary details.

      One click draws a palette of 3 to 15 colors, and you can lock the ones you like

      The random palette generator is a quick way to find a starting point for a color scheme. Every time you press New palette or hit the Space key, the colors change. A color whose lock you have pressed stays put, and only the rest are redrawn. There are four modes. Random draws red, green and blue each from 0 to 255. Harmony, Pastel and Vivid work in OKLCH, a color space matched to the lightness people perceive, and draw lightness and chroma from set ranges.

      The colors you draw are applied to a sample screen right away. The lightest color becomes the background, the darkest becomes the text, and the most saturated colors go to buttons and accents. The tool also judges whether the body-text contrast clears 4.5:1, the WCAG 2.2 threshold. Of 10,000 five-color palettes, only 55.0% of Random ones contain a text and background pair that clears it, against 99.6% of Harmony ones.

      When to use it

      • When you are stuck on a color scheme: flip through combinations with no colors decided in advance and find a direction. When a color appeals to you, lock it and keep drawing.
      • When you need colors to go with one brand color: open that color from a link or the history, lock it, and draw in Harmony mode. The other colors follow the rule, based on the hue angle of the locked color.
      • When you pick colors for slides, charts or thumbnails: the sample screen and the contrast verdict screen out combinations that cannot carry text. The HEX list and CSS variables copy straight out.

      How the colors are drawn

      1. Random: red, green and blue are each drawn separately from 0 to 255. This is the old method unchanged, so surprising combinations come up, but colors of similar lightness tend to cluster and muddy colors are easy to get.
      2. Why OKLCH: CSS Color 4 explains that HSL lightness does not match human perception. Yellow (#FFFF00) and blue (#0000FF), both at 50% HSL lightness, have OkLCh lightness of 0.968 and 0.452, so the fact that yellow looks far brighter shows up in the numbers. That is why Harmony, Pastel and Vivid set their ranges with OKLCH lightness (L), chroma (C) and hue angle (H).
      3. Harmony: pick one rule among analogous, complementary, triadic, split-complementary and monochromatic, then make colors by turning the base hue by the rule's angles (each angle shaken by ±6°). If a chromatic color is locked, its hue angle is the base. Lightness is divided evenly by the number of colors and then shuffled, so light and dark colors come out together.
      4. Pastel and Vivid: lightness and chroma are drawn from set ranges, and the hue turns by 137.5° from one color to the next so the colors spread out without overlapping.
      5. Colors the screen cannot show: if the chosen lightness and chroma fall outside sRGB, lightness and hue are kept and only chroma is reduced to fit. CSS Color 4 §14 (gamut mapping) goes in the same direction, bringing colors into range by reducing chroma.
      6. Random numbers: the browser's Crypto.getRandomValues() supplies them. MDN describes this function as providing cryptographically strong random values.
      ModeLightness LChroma CHue angle
      Random——Red, green and blue drawn separately
      Harmony0.30–0.920.05–0.16Rule angle ±6° (monochromatic uses chroma 0.03–0.12)
      Pastel0.82–0.930.04–0.09137.5° steps
      Vivid0.55–0.750.14–0.24137.5° steps
      Harmony ruleAngles turned from the base
      Analogous0°, 30°, −30°, 60°, −60°
      Complementary0°, 180°
      Triadic0°, 120°, 240°
      Split-complementary0°, 150°, 210°
      Monochromatic0°

      When there are more colors than the rule has angles, the angles start over from the beginning and lightness tells the colors apart. For example, a complementary rule with 5 colors puts colors of different lightness alternately at the two hue angles.

      How often each mode can carry text

      For each mode, 10,000 palettes were drawn and the share was counted in which the color with the highest relative luminance and the one with the lowest (the pair with the most contrast in the palette) have a contrast of at least the body-text threshold of 4.5:1. A fixed random seed makes the numbers repeatable.

      ColorsRandomHarmonyPastelVivid
      3 colors27.3%65.3%0.0%0.0%
      5 colors55.0%99.6%0.0%0.0%
      8 colors79.8%100.0%0.0%0.0%

      Basis: palettes drawn on 2026-10-12 with this tool's generation method (the ranges in the table above) from seed 2026, 10,000 per cell; contrast uses the WCAG 2.2 formula. The WCAG 2.2 and CSS Color 4 wording was checked the same day.

      A random 3-color palette has no pair usable as a text color about three times in four. Harmony deliberately spreads lightness wide, so from 5 colors on it almost always has such a pair. Pastel and Vivid pack every color's lightness into a narrow range and never once cleared the threshold. Use those two modes for backgrounds and decoration, and keep a dark color from outside the palette for text.

      How contrast is judged

      WCAG 2.2 criterionMinimum contrastApplies to
      1.4.3 Contrast (Minimum), AA4.5:1Body text. Large text: 3:1
      1.4.6 Contrast (Enhanced), AAA7:1Body text. Large text: 4.5:1
      1.4.11 Non-text Contrast, AA3:1Parts that are not text, such as button borders, icons and graphs

      Large text means 18 point or larger, or 14 point or larger when bold. WCAG does not round ratios, so this tool shows contrast rounded down to one decimal place and judges on that value (4.48:1 shows as 4.4:1 and fails). The sample screen judges body text on the background and button text on the primary color at 4.5:1, and the accent color on the background at 3:1. For button text and badge text the tool picks white or black, whichever has the higher contrast on the primary and accent colors. The "Aa" figure on each color card is likewise the higher contrast of white or black text on that color.

      Walking through the first example palette

      HEXRGBLightness LChroma CHue angleText on it · contrast
      #F3EBDD243, 235, 22194.3%0.020581.8°Black 17.7:1
      #2E3A5946, 58, 8935.3%0.0566267.3°White 11.2:1
      #D9734E217, 115, 7866.5%0.137840.3°Black 6.5:1
      #5F8F8495, 143, 13261.2%0.0547178.4°Black 5.7:1
      #E9B949233, 185, 7380.9%0.137985.2°Black 11.5:1

      In this palette the lightest color, #F3EBDD, is the background and the darkest, #2E3A59, is the text, so body contrast is 9.5:1. Among the remaining colors, the most saturated is #E9B949 (0.1379, against 0.1378 for #D9734E), so it becomes the main button, with black text on it at 11.5:1. The accent #5F8F84 against the background is 3.09:1, which shows as 3.0:1 and still clears the 3:1 graphics threshold.

      Common mistakes

      • Matching lightness in HSL: even with the same HSL lightness, yellow looks bright and blue looks dark. If lightness has to match, look at the OKLCH lightness (the L value on each card).
      • Using a color you like for text as well: a pretty color is not necessarily readable as text. If the sample screen's verdict falls short, change the text to the palette's darkest color or to a black-ish one.
      • Too many colors: use 15 colors when you want a wide field of candidates. On a real screen, trimming down to background, text, primary, secondary and accent keeps things tidier.
      • A locked color with no chroma: grays and whites have almost no chroma, so they have no defined hue angle. They do not serve as the base in Harmony mode, and drawing starts from a random angle.
      • Not checking color vision differences: this tool does not simulate color vision deficiency. For colors where the difference matters, such as red and green, check separately with the simulation in the color palette tool linked below.

      Limits and cautions

      • The colors are chosen at random, so even Harmony mode does not guarantee a good-looking result. The rules only organize the starting point, and the choosing is up to you.
      • The sample screen's role assignment is an automatic rule that looks only at lightness and chroma. In real design, change the roles to suit brand meaning or use.
      • Colors export only as sRGB HEX. The same HEX can look different on a monitor and in print, and conversion to CMYK for print is not done.
      • Recent palettes stay only in this browser's storage. To see one on another device, use Copy link.

      Sources

      Frequently asked questions

      Can I keep the colors I like and redraw the rest?

      Yes. Press the lock at the top right of a color card and that color stays fixed. When you press New palette or the Space key, only the other colors change. In Harmony mode, the matching colors are chosen around the hue angle of the locked chromatic color.

      How do Random and Harmony modes differ?

      Random draws red, green and blue separately from 0 to 255. Harmony sets hues in the OKLCH color space by the angles of one rule (analogous, complementary, triadic, split-complementary or monochromatic) and divides lightness evenly across the colors. Of 10,000 five-color palettes, the share containing a text and background pair at 4.5:1 or more body-text contrast was 55.0% for Random and 99.6% for Harmony.

      Can I choose text colors from a Pastel palette?

      Hardly. Pastel draws lightness only between 0.82 and 0.93, so its colors differ little in lightness, and among 10,000 palettes not one had a pair above 4.5:1 for body text. Use it for backgrounds and decoration, and keep a dark color from outside the palette for text.

      Why OKLCH instead of HSL?

      Because HSL lightness does not match the lightness people perceive. CSS Color 4 gives the example of yellow and blue at the same 50% HSL lightness, whose OkLCh lightness is 0.968 and 0.452, very different. When lightness ranges are set in OKLCH, colors drawn from a narrow range, as in Pastel and Vivid, actually look similar in lightness, while Harmony divides a wide range evenly so that light and dark colors come out together.

      How are the sample screen roles assigned?

      The lightest color (the one with the highest relative luminance) becomes the background and the darkest the body text. The rest go to the main button, secondary and accent in order of chroma. Button text is white or black, whichever has the higher contrast on the primary color. Body text and the button are judged at 4.5:1, and the accent color at 3:1.

      What is the "Aa" figure on a color card?

      It is the higher of the contrasts you would get with white text and with black text on that color. WCAG 2.2 asks for 4.5:1 for body text and at least 3:1 for large text, meaning 18 point or larger (14 point or larger if bold).

      Can I save or share a palette?

      Copy link puts an address containing the color codes on the clipboard, and opening it brings the palette back. New palettes are kept in the recent list, up to 50, only in this browser, and Clear all removes them. You can also copy the HEX list or CSS variables and paste them into design tools and code.

      I pressed Space and the page scrolled.

      The Space key draws a new palette only when the palette is on screen and no input field or button has focus. While you are reading the article, the page scrolls as usual. Click an empty spot where the palette is visible, then press Space.