← All free tools Misc tools

RGB to HEX

Convert your RGB color format to HEX format.

Accepts any format: #a8d08d, rgb(168 208 141), hsl(96, 42%, 68%), hsv(96, 32%, 82%) or a color name.

About this tool

Type or paste an RGB color, or choose one with the picker, and the converter shows it as HEX as you type, with a preview and every other format underneath, each with its own copy button. It reads colors written in any of the formats, and color names like “tomato”, too.

How to convert RGB to HEX

RGB already gives the red, green and blue channels, from 0 to 255. To write a HEX code, turn each channel into two base-16 digits and put them after a #: 168 is a8, 208 is d0 and 141 is 8d, which makes #a8d08d.

RGB to HEX examples

ColorRGBHEX
Sage green rgb(168, 208, 141) #a8d08d
Red rgb(255, 0, 0) #ff0000
Tomato rgb(255, 99, 71) #ff6347
Gold rgb(255, 215, 0) #ffd700
Dodger blue rgb(30, 144, 255) #1e90ff
Indigo rgb(75, 0, 130) #4b0082
Black rgb(0, 0, 0) #000000
White rgb(255, 255, 255) #ffffff

What is RGB?

RGB writes a color as its red, green and blue channels, each from 0 to 255, the way screens make color by mixing light. rgb(0, 0, 0) is black and rgb(255, 255, 255) is white.

What is HEX?

A HEX code is the most common way to write a color for the web and in design apps: a # followed by three pairs of base-16 digits, from 00 to ff, for red, green and blue. A three-digit code like #fc0 is short for #ffcc00.

Have a project in mind?

Have a brand or a product to grow?