Color Tools
What Is a HEX Color Code?
Hex codes appear everywhere in web design — in CSS stylesheets, design tools, and brand guidelines. Here is exactly what they mean and how to read them.
How hex colors work
Every colour on a screen is made from three channels: red, green, and blue (RGB). Each channel has an intensity from 0 (off) to 255 (maximum). A hex code is just those three numbers written in base 16 (hexadecimal), concatenated together with a # in front.
#FF0000#00FF00#0000FF#1C60F6#FFFFFFWhere you see hex codes
In CSS: color: #1c60f6; or background: #0f0f0f;. In HTML attributes: <font color="#ff0000">. In design tools like Figma, Sketch, and Adobe XD — every colour picker shows the hex code. In brand guidelines — most style guides specify brand colours as hex codes for consistency.
Convert any HEX color to RGB instantly
Paste a hex code and get the RGB breakdown plus CSS-ready output. Free.
HEX to RGB Converter →Frequently asked questions
What is a hex color code?
A hex color code is a six-character code that represents a colour in the RGB colour model. It is written with a # prefix followed by six hexadecimal digits (0–9 and A–F). Each pair of digits represents the intensity of one colour channel: the first two are red, the middle two are green, and the last two are blue. For example, #FF0000 is pure red, #00FF00 is pure green, and #0000FF is pure blue.
Why are hex codes used in web design?
Hex codes are compact, precise, and universally supported in CSS and HTML. A hex code uniquely identifies any of the 16,777,216 colours in the RGB colour space in just six characters. They are easier to share, copy, and paste than RGB triplets, which is why they became the standard format for web colours.
What does each part of a hex code mean?
A hex code like #1C60F6 breaks down as: 1C = 28 (red channel), 60 = 96 (green channel), F6 = 246 (blue channel). Each two-digit pair is a hexadecimal number from 00 (0 in decimal) to FF (255 in decimal), representing the intensity of that colour channel from 0 (none) to 255 (maximum).
What is the difference between 3-digit and 6-digit hex codes?
A 3-digit hex code like #1AF is shorthand for a 6-digit code where each digit is doubled: #11AAFF. It can only represent colours where each channel's two hex digits are identical (00, 11, 22, … FF). The 6-digit format can represent all 16.7 million colours; the 3-digit format can only represent 4,096.
Are hex color codes case sensitive?
No — hex color codes are not case sensitive. #1c60f6 and #1C60F6 represent exactly the same colour. CSS and HTML treat them identically. However, it is good practice to be consistent — many style guides prefer either all uppercase or all lowercase hex values.
How do I find the hex code for a colour I see on screen?
The easiest way is to use your operating system's built-in colour picker or a browser extension like ColorZilla for Chrome/Firefox. Design tools like Figma, Photoshop, and Canva display hex codes for any selected colour. If you have the RGB values, you can use an RGB to HEX converter to get the hex code.