Random Color Generator

A simple tool to generate random color codes.
Hex Code:
RGB Code:
CMYK Code:
HSL Code:


About color codes:

Hex Code:


Hexadecimal color codes are six digits in length. The first two digits give the Red value, the next two digits give the Green value, and the last two digits give the Blue value. Each value can range from "00" to "FF" which gives a possible 256 different values for Red, Green, or Blue. This gives a total of 16,777,216 total possible colors. When using this color format, a hash sign "#" is used just before the code without any spaces.

Hex Color Code Example The color of this text was applied from the sample code.

RGB Code:


RGB color codes are very similar to Hexadecimal codes, but instead of representing each of the base colors ( Red, Green, and Blue ) with a hex value, they simply have a numerical value ranging from 0 to 255. This gives the exact same amount of possible colors as hex color codes.

RGB Color Code Example The color of this text was applied from the sample code.

CMYK Code:


CMYK color codes represent Cyan, Magenta, Yellow, and Black. The value of each of these base tones is represented by a percentage from 0% to 100%. This type of color code is used in printers because these are the true primary colors that can physically be mixed together in the real world to create different colors.

CMYK Color Code Example note: CMYK color codes are not yet standardized in CSS.

HSL Code:


HSL color codes represent the Hue, Saturation, and Lightness levels of a color. The Hue value represents a specific color on the color wheel using degree values, ranging from 0 to 359. Here are a few Hue values; 0 = Red, 60 = Yellow, 120 = Green, 180 = Cyan, 240 = Blue, and 300 = Magenta. The Saturation level is given as a percent from 0% to 100%, this dictates the intensity of the color. The Lightness value is also represented by a percentage and dictates how light or dark the color is.

HSL Color Code Example The color of this text was applied from the sample code.