Skip to the palette generator

Color and palette generator

Randomly choose a color online or create a palette of 2-10 colors. Copy HEX, RGB or HSL and save the selected set.

How to choose colors?
or press Space

See the colors in use

Live preview
studio●

IT STARTS WITH COLOR

A small change.
New idea.

Discover the possibilities

Each color has its own number in the design. Click it to edit the color.

Click on the sample to edit. Drag onto another to swap colors. On your phone, first hold the sample. Keyboard: Alt + arrow. Click on the code to edit it. The copy icon copies the code.

No account. In your browser.
Click on the sample to choose color and notation. Drag a swatch onto another swatch to swap them.
More toolsPhoto · correction · gradient · contrast

All tools are free. Photos and your patterns remain in the browser.

Will the text be readable?

Contrast
Aah
This is what your text looks like

Check if it is easy to read.

WCAG AA: 4.5:1 for plain text; 3:1 for the large one. This is a measurement of this pair, not an audit of the entire project.

Your saved palettes 0Only on this device

Deleting browser data also deletes saved palettes. Important sets download or save their link.

Bring colors to your project

Select a palette format. The files are created in your browser.

Copy manually

The browser did not provide the clipboard. Select the text and copy it yourself.

YOUR COLOR. EVERY DETAIL.

Change color

New color

THE INSPIRATION IS ALREADY IN THE PICTURE

Palette from the photo

Load a photo and we will choose its dominant colors. Click on the image to download a specific point. The photo is processed locally.

ONE MOVE. NEW CHARACTER.

Fine-tune the palette

Before the change
After the change
COLORS IN SEAMLESS TRANSITION

Gradient from your palette

FIND CLEAR CONNECTIONS

Contrast of all pairs

The row is the text color, the column is the background color. Click on the result to view this pair in the main contrast preview.

✓ AA: ≥ 4.5:1 for plain text · ≥ 3:1 for large text only. The results are for solid colors.

INSTRUCTIONS AND COLOR IDEAS

Random colors and palettes: how to use the generator

Generate a single color or build a palette of two to ten colors. Lock swatches you want to keep, refine their shades and preview the result in a sample design. You can also extract colors from a photo, compare contrast, create a gradient and export your work.

Use “Try on the site” to preview your palette on Losownik.pl in your own browser. This guide explains the tools and helps you choose colors for your project.

A random color or a whole palette?

The “Random color” tab gives you a single starting point: a background color, an illustration detail, a game piece or a creative challenge. Each generation selects a color from the full 24-bit RGB range. Its HEX, RGB and HSL codes are shown immediately; click a code to copy it.

The twelve most recently generated colors appear in the history. Click a previous swatch to restore its value or copy a link to it. “Add to palette” adds the color to your set and locks it against further generation. You can then generate the remaining colors in the palette tab. Switching tabs preserves both results during your session.

If the palette already contains ten colors, reduce its size before adding another. The tool never silently replaces a color you chose. If a color is already present, its existing swatch is locked instead.

Build your own color palette step by step

Start with the task. A readable report, an illustration and an application interface have different needs. The generator helps you compare possibilities; the project determines which ones to keep.

  1. Choose the size and style. Start with three to five swatches. Try pastels, earth tones, vivid colors or a color harmony. “Fully random” is useful for unexpected inspiration.
  2. Generate and keep useful colors. Press “Generate palette”. Pressing the Space key also generates when focus is on the page or workspace, outside inputs, buttons and links. A padlock protects a swatch from the next generation. If all colors are locked, unlock at least one.
  3. Edit the code or open the color editor. Click a code to enter HEX directly. Click the swatch background to open the editor. On a phone, “More options” reveals HEX, numeric models, libraries and the option to add a new swatch.
  4. Insert, swap or remove a swatch. The plus between two swatches opens the editor at that position. On a phone, hold a swatch before dragging it onto another to swap them. A normal swipe scrolls the page. With a keyboard, focus the swatch background and use Alt plus an arrow. The delete button removes only that color, even if locked; the remaining order is preserved. Palettes contain two to ten swatches.
  5. Preview the colors. Numbers in the sample design identify the corresponding swatches and open their editors. Choose text and background colors in the contrast panel. “Try on the site” opens the separate site appearance editor.
  6. Save or export. The copy icon copies one color; “Copy palette” copies the whole set in your selected format. Save a palette locally, copy its link, or export PNG, SVG or CSS.

Increasing the size adds colors while retaining existing swatches. Reducing it removes unlocked swatches from the end. If the number of locked colors exceeds the requested size, unlock some first. “Undo” and “Redo” restore earlier palette arrangements.

Already have a color to build around? Enter its code in the editor and keep “Keep when generating” selected. Confirm with “Save color in palette” or the compact mobile “Done” button. Monochromatic, analogous and complementary modes use the hue of the first locked swatch as their reference. Several manually locked colors may fall outside the selected harmony; your choices are preserved.

Preview numbers connect colors to the design

The live preview uses your palette for a sample page with a background, a button and an illustration. Numbers match the palette swatches. Larger palettes add cards so that colors six through ten also appear in the design.

Hover over a swatch or focus it with the keyboard to highlight its numbers in the preview. Hovering or focusing a number highlights its swatch. Click a number to edit the linked color. Saving updates both the swatch and the design.

This example helps you judge proportions and neighboring colors. Check a specific text–background pair in the contrast panel: an attractive preview does not establish that every use of the palette is readable.

Try your palette on Losownik.pl

“Try on the site” transfers the palette to the appearance editor. Colors are assigned to backgrounds, cards, headings, text, buttons, navigation and details. You can also open this editor with “Color the site”.

  1. Select a role. Click a number on the page or select a role in the panel. These are twenty site appearance roles, separate from the palette swatch numbers.
  2. Refine the result. Change colors and see the result live. Choose among five presets, undo or redo changes, and use the page list to preview another game or page.
  3. Position the panel. Drag it, resize it or move it to the other side. “Collapse” hides its contents; “Expand” restores them.
  4. Choose what to keep. Save the profile, or close the panel with ×. “Keep my colors” saves the appearance in this browser for later visits. “Set default appearance” restores the original look while retaining the saved profile for reloading. “Return to editor” continues editing.

A palette and an appearance profile are separate records. “Save palette” stores the swatch set; a profile stores the colors assigned to site elements. A palette link does not include the profile. Your appearance settings affect only this browser, do not change the site for other visitors and do not sync between devices.

Choose colors precisely with HSV, HSL, RGB, CMYK and LAB

Click a swatch code to enter a three- or six-digit HEX value, with or without #. Valid input previews the color. Enter or ✓ saves it; Escape cancels. The copy icon can copy a valid preview before you commit it. Invalid input leaves the palette unchanged. Click the swatch background for the full editor.

The color area controls saturation and value; the rainbow slider changes hue. Original and draft samples show the difference. On a phone, the compact picker offers the color area, hue and “Done”. “More options” reveals HEX, numeric models, catalogs and adding swatches. Confirm with “Save color in palette”, “Add color to palette” or “Insert color here”, according to the action. Closing cancels the draft; clicking the original sample restores the starting color.

HSB and HSV are two names for the same model here: hue, saturation and value. HSL uses a different lightness definition, so matching numbers do not necessarily describe the same color. RGB directly controls red, green and blue. Sliders help explore a channel; numeric inputs reproduce a documented value.

CMYK is a mathematical approximation without an ICC profile. It does not replace preparing artwork in the profile required by a printer. CIELAB uses D65 white and a 2° observer. It differs from CSS lab(), which uses D50. If a LAB color falls outside sRGB, the editor reports it and clips the preview to the display range. Use HEX to transfer the displayed result.

Color names, favorites and custom swatch catalogs

The library contains 148 standard CSS color names. Search by name or browse colors ordered by similarity to your current sample. Similarity uses ΔE76 distance in CIELAB; it is a search aid, not a guarantee that materials will look identical. The star beside HEX saves a single favorite. Find it under “My saved colors”; click the star again to remove it. Favorites and saved palettes are separate collections.

The built-in selection of ten HKS K colors comes from the historical Bundesregierung palette in Scribus — Bundesregierung HKS. Its data file declares Public Domain. This is a partial selection, not the complete HKS catalog or an official print reference. Importing your own HKS catalog replaces it locally; removing that import restores the ten built-in entries.

RAL, HKS, Copic, Prismacolor and “Other catalog” accept your own CSV or GPL data. A CSV row contains a code, a name and a six-digit HEX value, for example A01,Light turquoise,#86B9AB. Files may contain up to 5000 swatches and be up to 2 MB. Search by code to find a color; results are ordered by similarity to the edited color. Full manufacturer catalogs are not included. Use data you are entitled to use. Copic and Prismacolor require your own import. Screen colors never replace physical paint, ink, marker or pencil swatches.

Create a palette from a photo

Expand “More tools” and choose “Palette from photo”. Load JPG, PNG or WebP up to 20 MB and 40 megapixels. Choose two to ten swatches; a uniform or transparent image may provide fewer colors. Processing stays in your browser: the image is not uploaded. Automatic extraction groups similar pixels and finds representative colors from larger areas, so it may differ from individual samples.

To capture a detail, select a swatch below the photo and click the desired pixel. Move the sampling point with arrow keys and press Enter to sample using a keyboard. Only “Use this palette” replaces your current set. Undo restores the previous palette.

Adjust the palette, create a gradient and compare contrast

“Adjust the whole palette” changes hue, saturation, lightness and warmth. Locked swatches are skipped by default. The before-and-after view helps compare results without editing every color separately. “Apply changes” commits; closing cancels. Warmth is a simple RGB adjustment, not a measurement of color temperature in kelvins.

The gradient follows palette order. Change its direction, reverse the colors, copy linear-gradient() or download SVG. For text over a gradient, check contrast at every part behind the text. The contrast table compares all pairs of solid colors: rows are text and columns are backgrounds. Click a result to select that pair in the main panel. ✓ marks ratios of at least 4.5:1.

PNG exports a ready-to-share image of the swatches and codes. SVG is a vector graphic; CSS contains variables for a website. These features are free and require no account or paid upgrade.

Check text contrast before using a palette

Select two swatches to see their contrast ratio and a text sample. Swapping foreground and background changes their roles but keeps the numerical ratio.

WCAG 2.2 minimum text contrast generally requires 4.5:1 for normal text and 3:1 for large text at AA. Large text means at least 18 pt, or 24 CSS px, or at least 14 pt bold, about 18.7 CSS px. This tool measures solid, opaque colors.

A passing pair does not establish accessibility for the entire site. Also check typeface, size, control states and keyboard access. Photos, transparency and gradients may change the actual background. Do not rely on color alone: include a clear message with a red error outline, for example.

Save, share and export your palette

“Save palette” adds the set and its locks to “Your saved palettes”. Click a saved set to load it; remove sets individually. The current swatches, current single color and recent-color history are also stored locally when the browser permits it.

“Copy link” encodes the color codes and their order in the address. Opening the link restores the set without locks. It does not transfer undo history, photos, custom catalogs, favorites or site appearance profiles.

“Export” downloads PNG or SVG with HEX codes, or a CSS file. You can also copy the CSS variable block. Files are generated locally. Download important palettes or retain their links: clearing browser data may remove your collection.

Assign colors roles such as background, card surface, text, primary action and accent. The exported CSS uses numbered variables --kolor-1, --kolor-2 and so on. Rename them for your project if useful. SVG retains the exact swatches and HEX values as a vector image for a moodboard, an SVG editor or a colleague.

For a creative exercise, combine a palette with the wheel of fortune: enter illustration themes, select one at random and create a picture with your colors. For a game with colored codes, try Mastermind.

HEX, RGB and HSL represent the same color

Names like sage, lavender and warm beige are useful descriptions, but do not identify an exact color. A code transfers a precise value. Changing the format does not change the palette; it changes how values are displayed and copied.

FormatThe same colorUseful when
HEX#86B9ABEntering a color in a graphics editor, website theme or CSS.
RGBrgb(134, 185, 171)A program accepts separate red, green and blue values.
HSLhsl(164, 27%, 63%)Comparing hue, saturation and lightness.

Six-digit HEX stores red, green and blue as three pairs using 0–9 and A–F. RGB expresses the same channels from 0 to 255. HSL uses a hue angle and percentages for saturation and lightness. HSL is rounded to integers here; use HEX or RGB for the most exact transfer.

The same code may look different on different screens because of display settings, lighting and surrounding colors. Print work needs a suitable process and color profile. A HEX value is not a paint recipe or a guarantee of the printed result.

Palette styles to try

Modes are starting points. Choosing a style regenerates unlocked swatches and preserves locks. Always check the actual composition.

Monochromatic: one hue, different lightness

A monochromatic palette keeps one hue and varies lightness. It helps build hierarchy with few colors and suits restrained interfaces and illustrations. Similar shades can merge when elements are small.

Analogous colors: gentle transitions

Analogous hues are neighbors on the color wheel, such as green, turquoise and blue. They help connect an illustration or background. Vary lightness and the area occupied by each color to retain hierarchy.

Complementary colors: a strong accent

Opposite hues, such as blue and orange, create stronger combinations. They need not occupy equal areas: one can dominate and the other highlight details. Opposite hues do not automatically provide readable text contrast.

Pastels, earth tones and vivid palettes

These are stylistic directions. Pastels use high lightness and moderate saturation; earth tones explore browns, olive and greens; vivid palettes increase saturation. Balanced palettes combine a light background, a dark swatch and colored accents. Fully random mode imposes no harmony.

Try different proportions. A light color covering most of a design looks different from the same color used as a small accent on a dark background. Swap roles or reduce the strongest color's area before discarding a palette.

Where can you use a color palette?

A palette gives a project a limited set of recurring colors. Headings, buttons, charts and illustrations can share a direction. Consistency does not mean equal proportions: some colors provide a calm background while others highlight important elements.

01 / WEBSITES AND APPS

A consistent interface

Choose backgrounds, text, buttons and details. Use HEX or CSS variables in your own site. Check active, hover and keyboard focus states.

02 / BRAND AND GRAPHICS

Recognizable materials

Reuse colors across covers, thumbnails, social posts and banners. Enter and lock an existing brand color, then find colors to accompany it.

03 / PRESENTATIONS AND DATA

Clear slides and charts

Assign colors to titles, highlights and data series. Use labels, shapes or line styles too; hue alone may not distinguish every series.

04 / ILLUSTRATION AND GAMES

A world in a few colors

A limited palette connects backgrounds, objects and interfaces in illustrations, pixel art, maps and games. Reserve a strong accent for an important object or action.

05 / INTERIORS AND CRAFTS

A moodboard starting point

Plan decorations, invitations or materials. Screen colors are inspiration: compare physical paint, fabric and paper samples in the intended lighting.

06 / LEARNING AND EXPERIMENTS

A creative exercise

Generate three colors and make a poster. Or keep one hue and build three different palettes. Compare how neighboring colors change the appearance of the same swatch.

Three palettes to start with

Open a set, edit its swatches and check a text–background pair. The proposed roles are background, surface, text, primary action and accent, in that order.

  • Calm green — light backgrounds, dark text and a green button.
  • Night contrast — dark surfaces, light text and cool accents.
  • Warm paper — cream, terracotta and muted green for illustrations and presentations.

Frequently asked questions

How do I generate a single random color?

Open “Random color” and press “Generate color”. Copy HEX, RGB or HSL individually. You can add the color to the palette, where it is automatically locked against later generation.

Is the color palette generator free?

Yes. Generate, edit, save and export without an account. The tool runs in a browser on computers and phones.

How do I keep one color and change the rest?

Lock its swatch and generate a new palette. Locked colors stay unchanged. If all swatches are locked, unlock at least one to generate again.

Can I enter a HEX code?

Yes. Click a swatch code and enter three or six HEX digits, with or without #. Enter or ✓ saves; Escape cancels. Click the background for the full editor, where you can replace a color or add a swatch.

How many colors can a palette contain?

Two to ten. Resizing preserves existing swatches as far as the requested size allows. Reducing the size removes only unlocked swatches, starting at the end.

Where are my palettes saved?

They are stored in this browser on this device. There is no fixed palette-count limit; capacity depends on the browser. They do not sync through an account. Clearing browser data may remove them, so download important palettes or keep their links.

How do I copy RGB or HSL instead of HEX?

Change “Copy as” below the swatches to RGB or HSL. The copy icon copies one color; “Copy palette” copies all rows in that format. HSL values are rounded to integers.

Can I undo a generation?

Yes. Undo restores the previous arrangement and Redo reapplies a change. History holds up to fifty changes in the current page session. Refreshing clears undo history, although the last palette can be restored from local storage.

Is every palette suitable for text?

No. Attractive colors may produce unreadable text on a background. Check the intended pair in the contrast panel. This does not replace assessing the finished project as a whole.

How do I insert a color between two swatches?

Click the plus between them, choose a color and confirm with “Insert color here” or the compact mobile “Add color” button. The new swatch appears at that position. Insertion is available below ten colors.

What do numbers in the sample design mean?

They identify the same numbered swatches in your palette. Click a number to edit its color. Saving updates the swatch and the design. This preview is separate from the site appearance editor opened by “Try on the site”.

Will other visitors see my site colors?

No. “Try on the site” changes your browser's appearance. Saving a profile or choosing “Keep my colors” retains it for later visits. Other visitors do not receive it, and palette links do not include it.

How do I restore the default appearance?

Use “Default appearance” in the appearance editor or choose “Set default appearance” when closing. The saved profile remains available to reload. Palettes saved with “Save palette” are stored separately.

Are photos and custom catalogs uploaded?

No. Images and catalogs are processed in the browser. A photo is not included in a saved palette or its link. Catalogs and favorites are stored locally when the browser permits it.

Does the generator work on phones?

Yes. Swatches stack vertically on narrow screens. You can copy, lock, generate, save and export. Hold a swatch before dragging to swap colors. Normal vertical swipes scroll the page.

Further reading

The W3C CSS Color specification explains color notation and models. The WCAG guide linked above explains text contrast. Color names below the swatches are approximate descriptions; the code identifies the exact color.