Hex and RGB, side by side
Hexadecimal and RGB are the two most common ways to write colors for the web. A hex code such as #FF0000 is a six-digit value: two digits for red, two for green, and two for blue, each ranging from 00 to FF. The RGB form of the same color is rgb(255, 0, 0), with each channel ranging from 0 to 255.
Use hexadecimal in CSS, HTML, and most design tools. Use RGB when you need to mix channels, add transparency with rgba(), or explain a color to someone who thinks in numbers rather than base-16. HSL (hue, saturation, lightness) is included here so you can rotate a color around the wheel without rebuilding it from scratch.
Type a hex value to convert it to RGB, type an rgb() string to convert it to hex, or drag the sliders until the preview matches the shade you need. Then copy the code into your stylesheet or brand sheet.