HEX to RGB Color Converter

Convert hexadecimal color codes to RGB values with instant color preview. Essential for web design and digital graphics.

#
6-digit hex code without # symbol
#FF0000
RGB(255, 0, 0)

RGB Components:

255
0
0

How HEX Colors Work

HEX Color Format

Hexadecimal colors use 6 digits to represent RGB values:

FF 00 00
Red Green Blue

Conversion Method

1

Split HEX code into three pairs

2

Convert each pair from hex to decimal

3

Combine into RGB format

Common Color Examples

Red
#FF0000 RGB(255, 0, 0)
Green
#00FF00 RGB(0, 255, 0)
Blue
#0000FF RGB(0, 0, 255)
Yellow
#FFFF00 RGB(255, 255, 0)
Magenta
#FF00FF RGB(255, 0, 255)
Cyan
#00FFFF RGB(0, 255, 255)

Usage in Web Development

CSS
color: #FF0000;
background-color: rgb(255, 0, 0);
border-color: rgba(255, 0, 0, 0.5);
HTML
<div style="color: #FF0000">
<div style="background: rgb(255, 0, 0)">
JavaScript
element.style.color = '#FF0000';
element.style.backgroundColor = 'rgb(255, 0, 0)';

Color Theory Basics

Primary Colors

Red, Green, Blue - cannot be created by mixing other colors

Color Mixing

RGB is additive color model - combining all colors gives white

Value Range

Each RGB component ranges from 0 to 255 (0 to FF in hex)

🛠️ Free Smart Tools

English English