Color converter


How to use the color converter?

There are different ways of using the color converter. You can convert RGB colors to HEX, or you can convert from HEX to RGB.

Convert RGB and RGBA to HEX

rgba slider
RGBA slider of the color converter

You can first set the value of red, green, blue and opacity with the sliders or by directly typing a value next to the sliders. These values need to be between 0 and 255 for the colors and between 0 and 1 for the opacity.

hex - rgba inputs
HEX and RGBA inputs of the color converter

The converter will directly show the value of the corresponding HTML color code (and so also the hexadecimal color code). The RGBA text input next to it will also adapt to the changes.

It is also possible to directly change the RGBA input to get the HTML color code (and so also the hexadecimal color code).

On each change, the colored square will change and show the corresponding color.

The converter allows to change the opacity, but notice that the HTML color code don’t have an opacity and so the changes have not effect on it.

Convert HEX to RGB or RGBA

You can directly set the hexadecimal color in the input under “HEX” and the converter will directly give you the result in RGBA under “RGBA”. The opacity is not set in the hexadecimal color code and so it is not relevant in the RGBA color code and so only the 3 first numbers are relevant.

Convert HTML color code to RGB or RGBA

To convert an HTML color code to RGB or RGBA, you can follow the same operation like for converting HEX to RGB or RGBA. Indeed the HTML color code is the same like the hexadecimal color, but with a “#” in the beginning. So, you can put into the input the value of the hexadecimal value, but with # at the beginning. The converter will directly give you the value of the equivalent RGBA. Because the opacity isn’t relevant for HTML color code, you can get the RGB from the RGBA only by taking the 3 first numbers of it.

Color codes

Colors can be written in different formats in function of it is written in hexadecimal or decimal. The 3 most important of them are:

  • Hexadecimal color is composed of 6-digits (0 to 9 and the 6 first letters of the alphabet – FF represent the number 255) that correspond to red, green and blue (2 digits for each color).
  • RGB is composed of 3 sets of numbers (from 0 to 255) that correspond to red, green and blue.
  • RGBA is the same like RGB but with a 4th value for the opacity (a) that go from 0 to 1.

HTML color code

The HTML code format starts with the symbol “#” and the Hexadecimal code of the color. For example:

  • #FF0000 (red): the maximum of red, no green and no blue
  • #00FF00 (green): no red, the maximum of green and no blue
  • #0000FF (blue): no red, no green and the maximum of blue.

Other calculors, converters, tools and tables in this category