What is a HEX color code?
A HEX code writes a color in hexadecimal as #RRGGBB: two digits for red, two for green and two for blue, each from 00 to FF. It covers 16,777,216 colors and is the most common color format in CSS and web design.

HEXgenerator.online creates harmonious color palettes in one click and exports them as CSS variables, SCSS, Tailwind or JSON. Press the space bar to generate, lock the colors you like and check WCAG contrast before you use the palette on your site.
Updated
Click a HEX to copy it · lock to keep it
Each cell shows the column color as text on the row color as background.
Click a shade to copy its HEX.
Saved in this browser only. Click a palette to load it.
A HEX code writes a color in hexadecimal as #RRGGBB: two digits for red, two for green and two for blue, each from 00 to FF. It covers 16,777,216 colors and is the most common color format in CSS and web design.
Copy the :root block with the --color-1, --color-2… variables and use them with var(--color-1) in any property, such as color or background. Then you can change the whole palette in one place.
Analogous uses neighboring hues and feels calm. Complementary pairs opposite hues for maximum contrast. Triadic spaces three hues 120° apart for a lively balance. Monochrome varies the lightness of one hue and is the most restrained.