Random Color Generator
Generate random colors with hex and RGB values.
How to Do It Manually
Colors in hex format are represented as #RRGGBB where RR, GG, BB are hexadecimal values from 00 to FF (0–255 in decimal) for red, green, and blue channels.
- Generate three random numbers from 0–255 for red, green, and blue.
- Convert each to a two-digit hexadecimal value.
- Combine: #RRGGBB.
Frequently Asked Questions
How many possible colors are there?
256 × 256 × 256 = 16,777,216 possible hex colors.
What is the difference between hex, RGB, and HSL?
Hex is a shorthand for RGB. RGB defines colors by red/green/blue intensity. HSL uses hue (color angle), saturation, and lightness — often more intuitive for design.