gold Hex code is #ffd700


HTML, CSS or hex color code for color "gold" is #ffd700

Hex code #ffd700
RGB: rgb(255,215,0)
HSV: ( 50.59° , 1% , 255% )

Colors used in web pages are represented using RGB (red, Green, blue) triplet. Each of the primary color component (red, green and blue are the primary colors) is represented using one byte. So, in a color code, there are 3 bytes (24 bits). The first byte is the red component and the next byte is of green and the next one that of blue.

The byte value for each color component can be represented using numbers from 0 - 255 or hexadecimal numbers 0 - ff. The hexadecimal value is preferred because it is quite compact and is often used in programming.

In the case of the color "gold" the hexadecimal representation is #ffd700. The hex code #ffd700 is equivalent of the RGB representation rgb(255,215,0)

You can use the hex code in HTML to change the text color or background color. for example, the code below changes the text color to gold

Sample HTML Code to change the text color to gold

    <span style="color:#ffd700"> Your text here </span>

Sample HTML Code to change the background color to gold

    <span style="background-color:#ffd700"> Your text here </span>
The same hex code can be used in CSS as well. For example, to change the text color of class 'mytext', add the following code to your CSS stylesheet

CSS Code