Random HEX color code generator
Generate several random hexadecimal color codes at once, with a visual preview, individual copy and export as CSS variables.
How it works
Need inspiration for a website palette, a set of test colors for a mockup, or just a random color for a creative project? Choose how many colors you want and generate them all in one click: each swatch shows its hex code, which you can copy individually, with a bulk export as CSS variables to drop straight into a stylesheet.
How does a hexadecimal color code work?
A HEX code like #3a6df0 encodes three values from 0 to 255 (red, green, blue) converted to base 16, giving two hexadecimal digits per component. It's the most widely used format in CSS and web design because it's compact and easy to copy and paste.
Can I use these colors directly in my CSS code?
Yes: the "Copy as CSS variables" button automatically formats all generated colors as custom properties (--color-1, --color-2, etc.), ready to paste into your stylesheet.
Colors are generated entirely in your browser via WebAssembly, with no connection to an external server.