Random Color Generator
Generate random colors in one click. Lock the ones you love and regenerate the rest. Copy individual or all as an array.
How to Use
- 1. Drag the slider to choose how many random colors to generate (1–20).
- 2. Click "Generate" to create a fresh batch of random colors.
- 3. Click the 🔒 icon to lock colors you want to keep.
- 4. Click "Copy" on any swatch to copy its HEX. Click "Copy All" to copy all as a JSON array.
About Random Color Generator
Sometimes design inspiration strikes from unexpected places. A random color generator is a fantastic tool for breaking creative blocks, exploring new palettes, or getting starting points for a design project. With over 16.7 million possible RGB combinations, you'll never run out of new colors to explore.
The lock feature is particularly useful for iterative design work. When you find a color you love, lock it in place and keep regenerating until the rest of the palette complements it. This workflow mimics the "evolutionary design" approach used by professional designers to refine palettes through iteration.
All colors are generated using JavaScript's Math.random() in your browser. No network requests are made and no data is stored. The "Copy All" feature produces a valid JSON array of HEX strings that you can immediately use in your code or design tool.
You may also find our Color Palette Generator and Color Shades Generator helpful.
Frequently Asked Questions
How are random colors generated?
Colors are generated by producing random values for red, green, and blue channels (0–255 each) using Math.random(). The combination creates millions of possible unique colors.
What does locking a color do?
Locking a color prevents it from being regenerated when you click "Generate". This lets you keep colors you like while refreshing the rest of the palette.
What is the maximum number of colors?
You can generate between 1 and 20 random colors at a time. Use the slider to adjust the count before generating.
Can I copy all colors at once?
Yes! Click "Copy All as Array" to copy all HEX values as a JSON array to your clipboard. You can then paste it into your code directly.
Are random colors good for design?
Random colors can provide inspiration and starting points. For production use, you'll typically want to refine them using tools like our Color Palette Generator for harmonious combinations.
Was this tool helpful?
More Tools
Related Color Tools
Color Palette Generator
Contrast Checker
Image Color Extractor
Color Shades Generator
You Might Also Like