color: rgb(65, 51, 255);
Instant color converter
color: rgb(65, 51, 255);
Hex and RGB are two ways of writing the same color for the web. A hex code like #4133FF packs red, green, and blue into a single six-digit string, while RGB spells out each channel as a separate number from 0 to 255.
Designers often work with hex codes because they're compact and easy to copy, while some tools and CSS properties expect RGB — this converter lets you move between the two instantly, without doing the math by hand.
| Black | #000000 |
rgb(0, 0, 0) |
| White | #FFFFFF |
rgb(255, 255, 255) |
| Red | #FF0000 |
rgb(255, 0, 0) |
| Green | #00FF00 |
rgb(0, 255, 0) |
| Blue | #0000FF |
rgb(0, 0, 255) |
| Yellow | #FFFF00 |
rgb(255, 255, 0) |
| Cyan | #00FFFF |
rgb(0, 255, 255) |
| Magenta | #FF00FF |
rgb(255, 0, 255) |
| Gray | #808080 |
rgb(128, 128, 128) |
| Orange | #FFA500 |
rgb(255, 165, 0) |
A hex color code is a six-digit hexadecimal number (like #FF5733) that represents a color using base-16 values for red, green, and blue. It's the standard color format in CSS and HTML.
RGB stands for Red, Green, Blue — the three color channels used in digital screens. Each channel is a number from 0 to 255, so rgb(255, 87, 51) means full red, medium green, and low blue.
A hex code is split into three pairs of digits — one each for red, green, and blue. Each pair is a base-16 number that gets converted to base-10 (0–255) to get the matching RGB value.
RGBA adds a fourth value, alpha, which controls transparency from 0 (fully transparent) to 1 (fully opaque). Plain RGB and hex codes are always fully opaque.
Yes — hex codes are one of the most common ways to set colors in CSS, for example color: #4133FF; or background-color: #f2f2f7;.