View video tutorial

HTML HEX Colors

HTML

HEX colors are created with different combinations of Red, Greed and Blue colors in Hexadecimal number.

Select and convert your color code in RGB | HEX | HSL


HEX color code.

Change Red, Green and Blue value to get HEX color code.

HTML HEX Colors


In HEX colors red,green,blue color are given in hexadecimal number.

Each color range from minimum 00 to maximum FF value.

#RRGGBBis used where RR, GG, BB are the color value in hexadecimal number.

#RRGGBBAAis used where RR, GG, BB are the color value in hexadecimal number and AA is the opacity 00 is low opacity FF is the highest opacity.

#ff0000

#0000ff

#3cb371

#ee82ee

#ffa500

#6a5acd

Learning with HTML Editor "Try it Now"

You can edit the HTML code and view the result using online editor.

Example

<!DOCTYPE html>
<html>

<head>
    <title>HTML HEX Color Example</title>
</head>

<body>

    <h2>HTML HEX Color Example</h2>

    <h2 style="background-color:#ff0000;">#ff0000</h2>
    <h2 style="background-color:#0000ff;">#0000ff</h2>
    <h2 style="background-color:#3cb371;">#3cb371</h2>
    <h2 style="background-color:#ee82ee;">#ee82ee</h2>
    <h2 style="background-color:#ffa500;">#ffa500</h2>
    <h2 style="background-color:#6a5acd;">#6a5acd</h2>

</body>

</html>
Try it Now »

Click on the "See output" button to see how it works.


Shades of gray color

Gray color is the color where Red, Green and Blue value for #RRGGBB are equal.