RGB HEX

Fine-tune your colors with interactive sliders and get precise hex codes for your CSS and design projects.

Or use the system picker:

Color Preview

Visual Reference Good Contrast

Hex Code

#4F46E5

CSS RGB

rgb(79, 70, 229)

CSS HSL

hsl(243, 75%, 59%)

Color Conversion Explained

RGB vs. Hex

RGB (Red, Green, Blue) represents colors as a mix of three primary lights. Each value ranges from 0 to 255. Hex codes are simply the hexadecimal (base-16) representation of these same values.

How Conversion Works

To convert manually, convert each of the three decimal values (0-255) to a two-digit hexadecimal number. For example, 255 becomes "FF", and 0 becomes "00". String them together with a '#' to get your code.

Pro Design Tip

Always consider accessibility. Our preview box automatically checks if your color will have good contrast for white text.

Common Web Colors

  • Pure White #FFFFFF
  • Pure Black #000000
  • Google Blue #4285F4
  • Netflix Red #E50914