HEX CODE: #ffd700

COLOUR RGB: 255, 215, 0
HSV: hsv(51, 100%, 100%)
HSL: hsl(51, 100%, 50%)
CMYK: cmyk(0%, 16%, 100%, 0%)
RGB and HEX – A Comparison

RGB and HEX are both color models
used to represent colors on digital devices. RGB stands for red, green, and blue, and it is the color model used by monitors and other digital displays. HEX stands for hexadecimal, and it is a way to represent colors using a six-digit hexadecimal code.- When working with digital images and videos, it is generally best to use RGB. This is because RGB is the color model used by monitors and other digital displays.
- When creating a color palette for a website or brand, it is also generally best to use RGB. This is because RGB colors will display consistently on all devices.
- When specifying colors in HTML, CSS, and other programming languages, it is generally best to use HEX. This is because HEX color codes are the most efficient way to represent colors in code.
- If you are unsure which color model to use, it is generally best to err on the side of caution and use HEX. HEX color codes are more compatible with a wider range of devices and software.
- If you are working on a project that will be primarily used on the web, it is generally best to use HEX. HEX color codes are the standard color format used in HTML, CSS, and other web development languages.
- If you are working on a project that will be primarily used in print, it is generally best to use RGB. RGB color codes are the standard color format used by printers and other print devices.
key differences between RGB and HEX
Feature | RGB | HEX |
---|---|---|
Color model | Additive | Subtractive |
Number of colors | 16 million | 16 million |
Color representation | Red, green, and blue channels | Hexadecimal code |
Common uses | Web design, graphic design, video editing | Web design, CSS, programming languages |
When to use RGB
When to use HEX
RGB vs HEX
:Additional Inputs on HEX Color Code

The HEX color code system
was invented by Tim Berners-Lee, the creator of the World Wide Web.- HEX color codes are used to define colors in HTML, CSS, and other programming languages.
- HEX color codes are made up of
six hexadecimal digits, which represent the red, green, and blue components
of the color. - The first two digits of a HEX color code represent the red component, the next two digits represent the green component, and the last two digits represent the blue component.
- The
HEX color code for black is #000000
, and theHEX color code for white is #FFFFFF.
- HEX color codes can be used to create a wide range of colors, including over 16 million unique colors.
Note: This content has inputs taken from the AI language model developed by OpenAI and by Bard, the Google AI model.
Formula for rgb to hex and hex to rgb converter

Find Color Hex from RGB (rgb to hex)
- R/16=R
- G/16=G
- B/16=B
- To convert RGB value as Hex (use hexdecimal number table)
- Hex=#+R+G+B
Get RGB color code from Hex code (hex to rgb)
- To convert Hex value as Decimal (use decimal number table)
- take first hex value multiply by 16
- take second hex value multiply by 16
- add first and second value this is R value
- take third hex value multiply by 16
- take fourth hex value multiply by 16
- add third and fourth value this is G value
- take fifth hex value multiply by 16
- take sixth hex value multiply by 16
- add fifth and sixth value this is B value
Formula to convert HSL to RGB
- When 0 ≤ H < 360, 0 ≤ S ≤ 1 and 0 ≤ L ≤ 1:
- C = (1 - |2L - 1|) × S
- X = C × (1 - |(H / 60°) mod 2 - 1|)
- m = L - C/2
- (R',G',B')=(C,X,0) if 0 <=H '< 1
- (R',G ',B')=(X,C,0) if 0<=H '< 2
- (R',G ',B')=(0,C,X) if 0<=H '< 3
- (R',G ',B')=(0,X,C if 0<=H '< 4
- (R',G ',B')=(X,0,C) if 0<=H '< 5
- (R',G ',B')=(C,0,X) if 0<=H '< 6
- (R,G,B) = ((R'+m)×255, (G '+m)×255,(B'+m)×255)
Formula to convert HSV to RGB
- When 0 ≤ H < 360, 0 ≤ S ≤ 1 and 0 ≤ V ≤ 1:
- C = V × S
- X = C × (1 - |(H / 60°) mod 2 - 1|)
- m = V-C
- (R',G',B')=(C,X,0) if 0° <=H '< 60°
- (R',G ',B')=(X,C,0) if 0°<=H '< 120°
- (R',G ',B')=(0,C,X) if 0°<=H '< 180°
- (R',G ',B')=(0,X,C if 0°<=H '< 240°
- (R',G ',B')=(X,0,C) if 0°<=H '< 300°
- (R',G ',B')=(C,0,X) if 0°<=H '< 360°
- (R,G,B) = ((R'+m)×255, (G '+m)×255,(B'+m)×255)
Formula to convert CMYK to RGB
- r= 255 *((1-c) * (1-k))
- g= 255 *( (1-m) * (1-k))
- b = 255 * ((1-y) * (1-k))
Note
- RGB color code values are based on the number system we are most familiar with, the decimal number system. The decimal number system is a Base-10 system, meaning there are 10 unique characters used to define the numbers. The 10 characters used are the numbers 0 – 9
- Hex color code values, in comparison, are based on the hexadecimal number system. The hexadecimal number system is a Base-16 system, meaning there are 16 unique characters used to define the numbers. The 16 characters used are the numbers 0 – 9, and the letters A – F
- Number system 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 for decimal
- Number system 0 1 2 3 4 5 6 7 8 9 A B C D E F for hexdecimal
Color Hex and RGB Color Codes for key colours

Color Codes | Hex code colour | RGB color code | CMYK | Preview |
---|---|---|---|---|
Red color code | Red hex code #FF0000 | Red rgb 255, 0, 0 | cmyk(0%,100%,100%,0%) | |
Pink color code | Pink hex code #FFC0CB | Pink rgb 255, 192, 203 | cmyk(0%,25%,20%,0%) | |
Orange color code | Orange hex code #FFA500 | Orange rgb 255, 165, 0 | cmyk(0%,35%,100%,0%) | |
Yellow color code | Yellow hex code #FFFF00 | Yellow rgb 255, 255, 0 | cmyk(0%,0%,100%,0%) | |
Green color code | Green hex code #008000 | Green rgb 0, 128, 0 | cmyk(100%,0%,100%,50%) | |
Blue color code | Blue hex code #0000FF | Blue rgb 0, 0, 255 | cmyk(100%,100%,0%,0%) | |
Brown color code | Brown hex code #A52A2A | Brown rgb 165, 42, 42 | cmyk(0%,75%,75%,35%) | |
White color code | White hex code #FFFFFF | White rgb 255, 255, 255 | cmyk(0%,0%,0%,0%) | |
Gray color code | Gray hex code #808080 | Gray rgb 128, 128, 128 | cmyk(0%,0%,0%,50%) | |
Gold color code | Gold hex code #FFD700 | Gold rgb 255, 215, 0 | cmyk(0%,16%,100%,0%) | |
Purple color code | Purple hex code #800080 | Purple rgb 128, 0, 128 | cmyk(0%,100%,0%,50%) | |
Orange color code | Orange hex code #FFA500 | Orange rgb 255, 165, 0 | cmyk(0%,35%,100%,0%) | |
Sage Green color code | Sage Green hex code #B2AC88 | Sage Green rgb 178, 172, 136 | cmyk(0%,3%,24%,30%) | |
Teal color code | Teal hex code #008080 | Teal rgb 0, 128, 128 | cmyk(100%,0%,0%,50%) | |
Lavender color code | Lavender hex code #E6E6FA | Lavender rgb 230, 230, 250 | cmyk(8%,8%,0%,2%) | |
Light Blue color code | Light Blue hex code #ADD8E6 | Light Blue rgb 173, 216, 230 | cmyk(25%,6%,0%,10%) | |
Beige color code | Beige hex code #F5F5DC | Beige rgb 245, 245, 220 | cmyk(0%,0%,10%,4%) | |
Hot Pink color code | Hot Pink hex code #FF69B4 | Hot Pink rgb 255, 105, 180 | cmyk(0%,59%,29%,0%) | |
Cyan color code | Cyan hex code #00FFFF | Cyan rgb 0, 255, 255 | cmyk(100%,0%,0%,0%) | |
Maroon color code | Maroon hex code #800000 | Maroon rgb 128, 0, 0 | cmyk(0%,100%,100%,50%) | |
Navy Blue color code | Navy Blue hex code #000080 | Navy Blue rgb 0, 0, 128 | cmyk(100%,100%,0%,50%) | |
Royal Blue color code | Royal Blue hex code #4169E1 | Royal Blue rgb 65, 105, 225 | cmyk(71%,53%,0%,12%) | |
Cream color code | Cream hex code #FFFDD0 | Cream rgb 255, 253, 208 | cmyk(0%,1%,18%,0%) | |
Dark Blue color code | Dark Blue hex code #00008B | Dark Blue rgb 0, 0, 139 | cmyk(100%,100%,0%,45%) | |
Magenta color code | Magenta hex code #8B008B | Magenta rgb 139, 0, 139 | cmyk(0%,100%,0%,45%) | |
Peach color code | Peach hex code #FFDAB9 | Peach rgb 255, 218, 185 | cmyk(0%,15%,27%,0%) | |
Dark Green color code | Dark Green hex code #006400 | Dark Green rgb 0, 100, 0 | cmyk(100%,0%,100%,61%) | |
Turquoise color code | Turquoise hex code #40E0D0 | Turquoise rgb 64, 224, 208 | cmyk(71%,0%7%,12%) | |
Coral color code | Coral hex code #FF7F50 | Coral rgb 255, 127, 80 | cmyk(0%,50%,69%,0%) | |
Black color code | Black hex code #000000 | Black rgb 0, 0, 0 | cmyk(0%,0%,0%,100%) | |
Lime Green color code | Lime Green hex code #32CD32 | Lime Green rgb 50, 205, 50 | cmyk(76%,0%,76%,20%) | |
Rose Gold color code | Rose Gold hex code #b76e79 | Rose Gold rgb 183,110,121 | cmyk(0%,40%,34%,28%) | |
Emerald color code | Emerald hex code #50C878 | Emerald rgb 80, 200, 120 | cmyk(60%,0%,40%,22%) | |
Bronze color code | Bronze hex code #CD7F32 | Bronze rgb 205,127,50 | cmyk(0%,38%,76%,20%) |
Frequently Asked Questions on RGB to Hexadecimal conversion, and HSL, HSV and CMYK Color Models

RGB stands for Red(R), Green (G), Blue (B). RGB is a color model where these colors are combined to create other colors. RGB for White is 255, 255, 255. RGB for Black is 0, 0, 0. All other colors are in between these two.
RGB stands for Red(R), Green (G), Blue (B). RGB is a color model where these colors are combined to create other colors. RGB for White is 255, 255, 255. RGB for Black is 0, 0, 0. All other colors are in between these two.
Hex code is hexadecimal representation of RGB code. It expresses the same color in hex format. Hexadecimal system uses 0-9 , A-F to represent the binary digits. 255 is FF in hexadecimal and 0 is 0 in hexadecimal. So white is FFFFFF in hexadecimal.
Hex code is hexadecimal representation of RGB code. It expresses the same color in hex format. Hexadecimal system uses 0-9 , A-F to represent the binary digits. 255 is FF in hexadecimal and 0 is 0 in hexadecimal. So white is FFFFFF in hexadecimal.
It is a more compact and shorter represenation of the color and uses fixed 6 digits unlike RGB that varies between 1 to 3 digits for each of R, G and B.
It is a more compact and shorter represenation of the color and uses fixed 6 digits unlike RGB that varies between 1 to 3 digits for each of R, G and B.
HSL : H - Hue, S - Saturation, L - Lightness. Hue means color (combination of Red, Blue and Green). Saturation refers to the intensity and purity of the color. 100% means the color or hue is pure not mixed with other shades, 0% means it's more of grey and not pure. Lightness is same as Brightness which is amount of white / black color added to it. 100% white is one end of lightness and 100% black is the other end representing 0 brightness. Hue is value between 0 to 255 (0xFF), Saturation and Value are in %.
HSL : H - Hue, S - Saturation, L - Lightness. Hue means color (combination of Red, Blue and Green). Saturation refers to the intensity and purity of the color. 100% means the color or hue is pure not mixed with other shades, 0% means it's more of grey and not pure. Lightness is same as Brightness which is amount of white / black color added to it. 100% white is one end of lightness and 100% black is the other end representing 0 brightness. Hue is value between 0 to 255 (0xFF), Saturation and Value are in %.
HSL : H - Hue, S - Saturation, V - Value. Hue means color (the combination of Red, Blue and Green). Saturation refers to the intensity and purity of it. As saturation increases it tends towards white shades and 100% means the color is white. Value is the brightness of a color. light color are also referred as tints and dark color are referred as shades. It does not go to white but from black to the chosen hue. Hue is value between 0 to 255 (0xFF), Saturation and Value are in %.
HSL : H - Hue, S - Saturation, V - Value. Hue means color (the combination of Red, Blue and Green). Saturation refers to the intensity and purity of it. As saturation increases it tends towards white shades and 100% means the color is white. Value is the brightness of a color. light color are also referred as tints and dark color are referred as shades. It does not go to white but from black to the chosen hue. Hue is value between 0 to 255 (0xFF), Saturation and Value are in %.
HSB is hue, saturation and brightness. It is same as HSV.
HSB is hue, saturation and brightness. It is same as HSV.
HSB and HSV are same. HSB is Hue Saturation Brightness. HSL and HSB/HSV are different.
HSB and HSV are same. HSB is Hue Saturation Brightness. HSL and HSB/HSV are different.
Hue is same in HSL and HSV but saturation and light/bright behavior is different in both. Saturation indicates intensity in both. In HSL , they grey component increases and becomes max as 100% but it's not white. In HSV, 100% saturation becomes white. The Lightness / Brightness in HSV goes all the way from black (0%) to white (100%). In HSV, it goes from black to selected hue. So the range of % in saturation and lightness/brightness values vary.
Hue is same in HSL and HSV but saturation and light/bright behavior is different in both. Saturation indicates intensity in both. In HSL , they grey component increases and becomes max as 100% but it's not white. In HSV, 100% saturation becomes white. The Lightness / Brightness in HSV goes all the way from black (0%) to white (100%). In HSV, it goes from black to selected hue. So the range of % in saturation and lightness/brightness values vary.
These color models are mainly used in computer software like image processing/editing tools, image scraping , facial recognition, computer graphic applications. RGB is a simple visual color model as perceived by the human eye. HSV, HSL are used by computer systems to process color information with intensity, lightness and other parameters and create a visual model that matches that of human visual processing.
These color models are mainly used in computer software like image processing/editing tools, image scraping , facial recognition, computer graphic applications. RGB is a simple visual color model as perceived by the human eye. HSV, HSL are used by computer systems to process color information with intensity, lightness and other parameters and create a visual model that matches that of human visual processing.
CMYK is another color model and industry standard for color printing. CMYK Stands for Cyan, Magenta, Yellow and Key(Black).
CMYK is another color model and industry standard for color printing. CMYK Stands for Cyan, Magenta, Yellow and Key(Black).
RGB - when all colors are combined, it is white in RGB and absence of color is black. CMYK - when all colors are combined it is black and absence of color is white. Screens, Televisions and monitors all use RGB color model. Wherever visual medium is based on transmitted 'light', RGB is preferred. CMYK is mainly used in color printing.
RGB - when all colors are combined, it is white in RGB and absence of color is black. CMYK - when all colors are combined it is black and absence of color is white. Screens, Televisions and monitors all use RGB color model. Wherever visual medium is based on transmitted 'light', RGB is preferred. CMYK is mainly used in color printing.
The different colors are combined in various ways to produce new colors going from darkness to lightness. It starts with Black which is rgb(0,0,0) and as the colors are added in different intensity, it produces new colors of increasing values It finally becomes White which is ryb (255,255,255). RGB is an additive color system and creates illumining colors on screen using transmitted light.
The different colors are combined in various ways to produce new colors going from darkness to lightness. It starts with Black which is rgb(0,0,0) and as the colors are added in different intensity, it produces new colors of increasing values It finally becomes White which is ryb (255,255,255). RGB is an additive color system and creates illumining colors on screen using transmitted light.
It starts with White (bg such as paper) and then when subtractive colors are mixed with it, it becomes darker and darker till it is black. CMYK is a subtractive color system where adding Cyan, Magenta and Yellow to white in equal measures makes it black. Black is the 'K' part of CMYK also known as the key color. This is based on reflective light from a white medium.
It starts with White (bg such as paper) and then when subtractive colors are mixed with it, it becomes darker and darker till it is black. CMYK is a subtractive color system where adding Cyan, Magenta and Yellow to white in equal measures makes it black. Black is the 'K' part of CMYK also known as the key color. This is based on reflective light from a white medium.
Brightness is absolute value like 0%, 25%, 60%, 100% and it's independent of the observer. Lightness is perceived view of the brightness. It depends on the observer. Luminosity is the light emitted by an object. It depends on the surface area, object type and a calculated value.
Brightness is absolute value like 0%, 25%, 60%, 100% and it's independent of the observer. Lightness is perceived view of the brightness. It depends on the observer. Luminosity is the light emitted by an object. It depends on the surface area, object type and a calculated value.
rgb is 255, 215, 0
rgb is 255, 215, 0
#0000FF
#0000FF
#FFC0CB
#FFC0CB
#008000
#008000
#FFFF00
#FFFF00
#9370DB
#9370DB
rgb is 0, 128, 0
rgb is 0, 128, 0
rgb is 255, 255, 0
rgb is 255, 255, 0
#FFA500
#FFA500
#A52A2A
#A52A2A
#FFD700
#FFD700
rgb is 255, 165, 0
rgb is 255, 165, 0
#9CAF88
#9CAF88
Convert the red, green and blue color values from decimal to hex. Concatenate the 3 hex values of the red, green and blue together: RRGGBB.
Convert the red, green and blue color values from decimal to hex. Concatenate the 3 hex values of the red, green and blue together: RRGGBB.
Get the 2 left digits of the hex color code and convert to decimal value to get the red color level. Get the 2 middle digits of the hex color code and convert to decimal value to get the green color level. Get the 2 right digits of the hex color code and convert to decimal value to get the blue color level. And get 3 values that correspond to RGB values.
Get the 2 left digits of the hex color code and convert to decimal value to get the red color level. Get the 2 middle digits of the hex color code and convert to decimal value to get the green color level. Get the 2 right digits of the hex color code and convert to decimal value to get the blue color level. And get 3 values that correspond to RGB values.
#808080
#808080
rgb is 183, 110, 121
rgb is 183, 110, 121
#008080
#008080
#ADD8E6
#ADD8E6
#FF0000
#FF0000
#E6E6FA
#E6E6FA
#0000FF
#0000FF
rgb is 173 , 216 , 230
rgb is 173 , 216 , 230
#008000
#008000
rgb is 0, 128, 0
rgb is 0, 128, 0
#F5F5DC
#F5F5DC
#000080
#000080
#808080
#808080
#FF69B4
#FF69B4