HTML Color Codes

: HTML color codes chart: all 148 CSS color names by family and the 216 web-safe colors with hex, RGB and HSL values, plus the codes and nearest names for any color
Find a colour
Pick or type a colour to get its HTML codes and the nearest named colours. Leave it blank to browse the chart.
Colour codes

Red colour names (9)

Pink colour names (6)

Orange colour names (5)

Yellow colour names (11)

Purple colour names (19)

Green colour names (23)

Cyan colour names (9)

Blue colour names (15)

Brown colour names (17)

White colour names (17)

Gray colour names (17)

Colour codes table

IndianRedRed#CD5C5Crgb(205, 92, 92)hsl(0, 53%, 58%)Black text 5.28:1
LightCoralRed#F08080rgb(240, 128, 128)hsl(0, 79%, 72%)Black text 8.10:1
SalmonRed#FA8072rgb(250, 128, 114)hsl(6, 93%, 71%)Black text 8.39:1
DarkSalmonRed#E9967Argb(233, 150, 122)hsl(15, 72%, 70%)Black text 9.10:1
LightSalmonRed#FFA07Argb(255, 160, 122)hsl(17, 100%, 74%)Black text 10.56:1
CrimsonRed#DC143Crgb(220, 20, 60)hsl(348, 83%, 47%)White text 4.98:1
RedRed#FF0000rgb(255, 0, 0)hsl(0, 100%, 50%)Black text 5.25:1
FireBrickRed#B22222rgb(178, 34, 34)hsl(0, 68%, 42%)White text 6.67:1
DarkRedRed#8B0000rgb(139, 0, 0)hsl(0, 100%, 27%)White text 10.01:1
PinkPink#FFC0CBrgb(255, 192, 203)hsl(350, 100%, 88%)Black text 13.65:1
LightPinkPink#FFB6C1rgb(255, 182, 193)hsl(351, 100%, 86%)Black text 12.71:1
HotPinkPink#FF69B4rgb(255, 105, 180)hsl(330, 100%, 71%)Black text 7.93:1
DeepPinkPink#FF1493rgb(255, 20, 147)hsl(328, 100%, 54%)Black text 5.77:1
MediumVioletRedPink#C71585rgb(199, 21, 133)hsl(322, 81%, 43%)White text 5.42:1
PaleVioletRedPink#DB7093rgb(219, 112, 147)hsl(340, 60%, 65%)Black text 6.75:1
CoralOrange#FF7F50rgb(255, 127, 80)hsl(16, 100%, 66%)Black text 8.40:1
TomatoOrange#FF6347rgb(255, 99, 71)hsl(9, 100%, 64%)Black text 7.12:1
OrangeRedOrange#FF4500rgb(255, 69, 0)hsl(16, 100%, 50%)Black text 6.10:1
DarkOrangeOrange#FF8C00rgb(255, 140, 0)hsl(33, 100%, 50%)Black text 9.00:1
OrangeOrange#FFA500rgb(255, 165, 0)hsl(39, 100%, 50%)Black text 10.63:1
GoldYellow#FFD700rgb(255, 215, 0)hsl(51, 100%, 50%)Black text 14.97:1
YellowYellow#FFFF00rgb(255, 255, 0)hsl(60, 100%, 50%)Black text 19.55:1
LightYellowYellow#FFFFE0rgb(255, 255, 224)hsl(60, 100%, 94%)Black text 20.63:1
LemonChiffonYellow#FFFACDrgb(255, 250, 205)hsl(54, 100%, 90%)Black text 19.80:1
LightGoldenrodYellowYellow#FAFAD2rgb(250, 250, 210)hsl(60, 80%, 90%)Black text 19.66:1
PapayaWhipYellow#FFEFD5rgb(255, 239, 213)hsl(37, 100%, 92%)Black text 18.55:1
MoccasinYellow#FFE4B5rgb(255, 228, 181)hsl(38, 100%, 85%)Black text 17.01:1
PeachPuffYellow#FFDAB9rgb(255, 218, 185)hsl(28, 100%, 86%)Black text 15.98:1
PaleGoldenrodYellow#EEE8AArgb(238, 232, 170)hsl(55, 67%, 80%)Black text 16.75:1
KhakiYellow#F0E68Crgb(240, 230, 140)hsl(54, 77%, 75%)Black text 16.40:1
DarkKhakiYellow#BDB76Brgb(189, 183, 107)hsl(56, 38%, 58%)Black text 10.14:1
LavenderPurple#E6E6FArgb(230, 230, 250)hsl(240, 67%, 94%)Black text 17.06:1
ThistlePurple#D8BFD8rgb(216, 191, 216)hsl(300, 24%, 80%)Black text 12.36:1
PlumPurple#DDA0DDrgb(221, 160, 221)hsl(300, 47%, 75%)Black text 10.14:1
VioletPurple#EE82EErgb(238, 130, 238)hsl(300, 76%, 72%)Black text 9.06:1
OrchidPurple#DA70D6rgb(218, 112, 214)hsl(302, 59%, 65%)Black text 7.26:1
FuchsiaPurple#FF00FFrgb(255, 0, 255)hsl(300, 100%, 50%)Black text 6.69:1
MagentaPurple#FF00FFrgb(255, 0, 255)hsl(300, 100%, 50%)Black text 6.69:1
MediumOrchidPurple#BA55D3rgb(186, 85, 211)hsl(288, 59%, 58%)Black text 5.32:1
MediumPurplePurple#9370DBrgb(147, 112, 219)hsl(260, 60%, 65%)Black text 5.58:1
RebeccaPurplePurple#663399rgb(102, 51, 153)hsl(270, 50%, 40%)White text 8.40:1
BlueVioletPurple#8A2BE2rgb(138, 43, 226)hsl(271, 76%, 53%)White text 5.95:1
DarkVioletPurple#9400D3rgb(148, 0, 211)hsl(282, 100%, 41%)White text 6.56:1
DarkOrchidPurple#9932CCrgb(153, 50, 204)hsl(280, 61%, 50%)White text 5.70:1
DarkMagentaPurple#8B008Brgb(139, 0, 139)hsl(300, 100%, 27%)White text 8.49:1
PurplePurple#800080rgb(128, 0, 128)hsl(300, 100%, 25%)White text 9.41:1
IndigoPurple#4B0082rgb(75, 0, 130)hsl(275, 100%, 25%)White text 12.95:1
SlateBluePurple#6A5ACDrgb(106, 90, 205)hsl(248, 53%, 58%)White text 5.30:1
DarkSlateBluePurple#483D8Brgb(72, 61, 139)hsl(248, 39%, 39%)White text 9.06:1
MediumSlateBluePurple#7B68EErgb(123, 104, 238)hsl(249, 80%, 67%)Black text 5.05:1
GreenYellowGreen#ADFF2Frgb(173, 255, 47)hsl(84, 100%, 59%)Black text 17.12:1
ChartreuseGreen#7FFF00rgb(127, 255, 0)hsl(90, 100%, 50%)Black text 16.20:1
LawnGreenGreen#7CFC00rgb(124, 252, 0)hsl(90, 100%, 49%)Black text 15.78:1
LimeGreen#00FF00rgb(0, 255, 0)hsl(120, 100%, 50%)Black text 15.30:1
LimeGreenGreen#32CD32rgb(50, 205, 50)hsl(120, 61%, 50%)Black text 9.91:1
PaleGreenGreen#98FB98rgb(152, 251, 152)hsl(120, 93%, 79%)Black text 16.58:1
LightGreenGreen#90EE90rgb(144, 238, 144)hsl(120, 73%, 75%)Black text 14.81:1
MediumSpringGreenGreen#00FA9Argb(0, 250, 154)hsl(157, 100%, 49%)Black text 15.14:1
SpringGreenGreen#00FF7Frgb(0, 255, 127)hsl(150, 100%, 50%)Black text 15.61:1
MediumSeaGreenGreen#3CB371rgb(60, 179, 113)hsl(147, 50%, 47%)Black text 7.87:1
SeaGreenGreen#2E8B57rgb(46, 139, 87)hsl(146, 50%, 36%)Black text 4.94:1
ForestGreenGreen#228B22rgb(34, 139, 34)hsl(120, 61%, 34%)Black text 4.78:1
GreenGreen#008000rgb(0, 128, 0)hsl(120, 100%, 25%)White text 5.13:1
DarkGreenGreen#006400rgb(0, 100, 0)hsl(120, 100%, 20%)White text 7.43:1
YellowGreenGreen#9ACD32rgb(154, 205, 50)hsl(80, 61%, 50%)Black text 11.15:1
OliveDrabGreen#6B8E23rgb(107, 142, 35)hsl(80, 60%, 35%)Black text 5.51:1
OliveGreen#808000rgb(128, 128, 0)hsl(60, 100%, 25%)Black text 5.00:1
DarkOliveGreenGreen#556B2Frgb(85, 107, 47)hsl(82, 39%, 30%)White text 5.94:1
MediumAquamarineGreen#66CDAArgb(102, 205, 170)hsl(160, 51%, 60%)Black text 10.87:1
DarkSeaGreenGreen#8FBC8Frgb(143, 188, 143)hsl(120, 25%, 65%)Black text 9.75:1
LightSeaGreenGreen#20B2AArgb(32, 178, 170)hsl(177, 70%, 41%)Black text 8.01:1
DarkCyanGreen#008B8Brgb(0, 139, 139)hsl(180, 100%, 27%)Black text 5.06:1
TealGreen#008080rgb(0, 128, 128)hsl(180, 100%, 25%)White text 4.77:1
AquaCyan#00FFFFrgb(0, 255, 255)hsl(180, 100%, 50%)Black text 16.74:1
CyanCyan#00FFFFrgb(0, 255, 255)hsl(180, 100%, 50%)Black text 16.74:1
LightCyanCyan#E0FFFFrgb(224, 255, 255)hsl(180, 100%, 94%)Black text 19.91:1
PaleTurquoiseCyan#AFEEEErgb(175, 238, 238)hsl(180, 65%, 81%)Black text 16.28:1
AquamarineCyan#7FFFD4rgb(127, 255, 212)hsl(160, 100%, 75%)Black text 17.15:1
TurquoiseCyan#40E0D0rgb(64, 224, 208)hsl(174, 72%, 56%)Black text 12.79:1
MediumTurquoiseCyan#48D1CCrgb(72, 209, 204)hsl(178, 60%, 55%)Black text 11.26:1
DarkTurquoiseCyan#00CED1rgb(0, 206, 209)hsl(181, 100%, 41%)Black text 10.74:1
CadetBlueCyan#5F9EA0rgb(95, 158, 160)hsl(182, 25%, 50%)Black text 6.88:1
SteelBlueBlue#4682B4rgb(70, 130, 180)hsl(207, 44%, 49%)Black text 5.11:1
LightSteelBlueBlue#B0C4DErgb(176, 196, 222)hsl(214, 41%, 78%)Black text 11.79:1
LightBlueBlue#ADD8E6rgb(173, 216, 230)hsl(195, 53%, 79%)Black text 13.74:1
PowderBlueBlue#B0E0E6rgb(176, 224, 230)hsl(187, 52%, 80%)Black text 14.65:1
LightSkyBlueBlue#87CEFArgb(135, 206, 250)hsl(203, 92%, 75%)Black text 12.23:1
SkyBlueBlue#87CEEBrgb(135, 206, 235)hsl(197, 71%, 73%)Black text 12.05:1
CornflowerBlueBlue#6495EDrgb(100, 149, 237)hsl(219, 79%, 66%)Black text 7.06:1
DeepSkyBlueBlue#00BFFFrgb(0, 191, 255)hsl(195, 100%, 50%)Black text 9.89:1
DodgerBlueBlue#1E90FFrgb(30, 144, 255)hsl(210, 100%, 56%)Black text 6.48:1
RoyalBlueBlue#4169E1rgb(65, 105, 225)hsl(225, 73%, 57%)White text 4.84:1
BlueBlue#0000FFrgb(0, 0, 255)hsl(240, 100%, 50%)White text 8.59:1
MediumBlueBlue#0000CDrgb(0, 0, 205)hsl(240, 100%, 40%)White text 11.16:1
DarkBlueBlue#00008Brgb(0, 0, 139)hsl(240, 100%, 27%)White text 15.29:1
NavyBlue#000080rgb(0, 0, 128)hsl(240, 100%, 25%)White text 16.00:1
MidnightBlueBlue#191970rgb(25, 25, 112)hsl(240, 64%, 27%)White text 14.84:1
CornsilkBrown#FFF8DCrgb(255, 248, 220)hsl(48, 100%, 93%)Black text 19.71:1
BlanchedAlmondBrown#FFEBCDrgb(255, 235, 205)hsl(36, 100%, 90%)Black text 18.01:1
BisqueBrown#FFE4C4rgb(255, 228, 196)hsl(33, 100%, 88%)Black text 17.14:1
NavajoWhiteBrown#FFDEADrgb(255, 222, 173)hsl(36, 100%, 84%)Black text 16.30:1
WheatBrown#F5DEB3rgb(245, 222, 179)hsl(39, 77%, 83%)Black text 15.98:1
BurlyWoodBrown#DEB887rgb(222, 184, 135)hsl(34, 57%, 70%)Black text 11.31:1
TanBrown#D2B48Crgb(210, 180, 140)hsl(34, 44%, 69%)Black text 10.64:1
RosyBrownBrown#BC8F8Frgb(188, 143, 143)hsl(0, 25%, 65%)Black text 7.46:1
SandyBrownBrown#F4A460rgb(244, 164, 96)hsl(28, 87%, 67%)Black text 10.32:1
GoldenrodBrown#DAA520rgb(218, 165, 32)hsl(43, 74%, 49%)Black text 9.38:1
DarkGoldenrodBrown#B8860Brgb(184, 134, 11)hsl(43, 89%, 38%)Black text 6.45:1
PeruBrown#CD853Frgb(205, 133, 63)hsl(30, 59%, 53%)Black text 7.02:1
ChocolateBrown#D2691Ergb(210, 105, 30)hsl(25, 75%, 47%)Black text 5.77:1
SaddleBrownBrown#8B4513rgb(139, 69, 19)hsl(25, 76%, 31%)White text 7.09:1
SiennaBrown#A0522Drgb(160, 82, 45)hsl(19, 56%, 40%)White text 5.61:1
BrownBrown#A52A2Argb(165, 42, 42)hsl(0, 59%, 41%)White text 7.08:1
MaroonBrown#800000rgb(128, 0, 0)hsl(0, 100%, 25%)White text 10.94:1
WhiteWhite#FFFFFFrgb(255, 255, 255)hsl(0, 0%, 100%)Black text 21.00:1
SnowWhite#FFFAFArgb(255, 250, 250)hsl(0, 100%, 99%)Black text 20.30:1
HoneyDewWhite#F0FFF0rgb(240, 255, 240)hsl(120, 100%, 97%)Black text 20.26:1
MintCreamWhite#F5FFFArgb(245, 255, 250)hsl(150, 100%, 98%)Black text 20.56:1
AzureWhite#F0FFFFrgb(240, 255, 255)hsl(180, 100%, 97%)Black text 20.45:1
AliceBlueWhite#F0F8FFrgb(240, 248, 255)hsl(208, 100%, 97%)Black text 19.57:1
GhostWhiteWhite#F8F8FFrgb(248, 248, 255)hsl(240, 100%, 99%)Black text 19.86:1
WhiteSmokeWhite#F5F5F5rgb(245, 245, 245)hsl(0, 0%, 96%)Black text 19.26:1
SeaShellWhite#FFF5EErgb(255, 245, 238)hsl(25, 100%, 97%)Black text 19.54:1
BeigeWhite#F5F5DCrgb(245, 245, 220)hsl(60, 56%, 91%)Black text 18.97:1
OldLaceWhite#FDF5E6rgb(253, 245, 230)hsl(39, 85%, 95%)Black text 19.38:1
FloralWhiteWhite#FFFAF0rgb(255, 250, 240)hsl(40, 100%, 97%)Black text 20.18:1
IvoryWhite#FFFFF0rgb(255, 255, 240)hsl(60, 100%, 97%)Black text 20.81:1
AntiqueWhiteWhite#FAEBD7rgb(250, 235, 215)hsl(34, 78%, 91%)Black text 17.92:1
LinenWhite#FAF0E6rgb(250, 240, 230)hsl(30, 67%, 94%)Black text 18.67:1
LavenderBlushWhite#FFF0F5rgb(255, 240, 245)hsl(340, 100%, 97%)Black text 19.03:1
MistyRoseWhite#FFE4E1rgb(255, 228, 225)hsl(6, 100%, 94%)Black text 17.43:1
GainsboroGray#DCDCDCrgb(220, 220, 220)hsl(0, 0%, 86%)Black text 15.31:1
LightGrayGray#D3D3D3rgb(211, 211, 211)hsl(0, 0%, 83%)Black text 14.02:1
LightGreyGray#D3D3D3rgb(211, 211, 211)hsl(0, 0%, 83%)Black text 14.02:1
SilverGray#C0C0C0rgb(192, 192, 192)hsl(0, 0%, 75%)Black text 11.54:1
DarkGrayGray#A9A9A9rgb(169, 169, 169)hsl(0, 0%, 66%)Black text 8.93:1
DarkGreyGray#A9A9A9rgb(169, 169, 169)hsl(0, 0%, 66%)Black text 8.93:1
GrayGray#808080rgb(128, 128, 128)hsl(0, 0%, 50%)Black text 5.31:1
GreyGray#808080rgb(128, 128, 128)hsl(0, 0%, 50%)Black text 5.31:1
DimGrayGray#696969rgb(105, 105, 105)hsl(0, 0%, 41%)White text 5.48:1
DimGreyGray#696969rgb(105, 105, 105)hsl(0, 0%, 41%)White text 5.48:1
LightSlateGrayGray#778899rgb(119, 136, 153)hsl(210, 14%, 53%)Black text 5.76:1
LightSlateGreyGray#778899rgb(119, 136, 153)hsl(210, 14%, 53%)Black text 5.76:1
SlateGrayGray#708090rgb(112, 128, 144)hsl(210, 13%, 50%)Black text 5.17:1
SlateGreyGray#708090rgb(112, 128, 144)hsl(210, 13%, 50%)Black text 5.17:1
DarkSlateGrayGray#2F4F4Frgb(47, 79, 79)hsl(180, 25%, 25%)White text 8.92:1
DarkSlateGreyGray#2F4F4Frgb(47, 79, 79)hsl(180, 25%, 25%)White text 8.92:1
BlackGray#000000rgb(0, 0, 0)hsl(0, 0%, 0%)White text 21.00:1
148 colours

HTML color codes for every color name a browser knows: all 148 CSS color names, grouped into red, pink, orange, yellow, purple, green, cyan, blue, brown, white and gray, each with its hex color value, RGB and HSL code and whether white or black text reads better on it. A second chart lists the 216 web-safe colors. Type or pick any color to get its codes, the nearest named colors and CSS and HTML lines ready to paste. It all runs in your browser.

  1. Browse All names for the full hex color values chart, or open one family such as Blue or Green for its color names and shades. Web safe shows the 216-color palette (a drop-down on a phone).
  2. Press a swatch to copy its code. Swatches and Copy give chooses what is copied: the HEX code (#FF6347), rgb(255, 99, 71), hsl(9, 100%, 64%) or the CSS name (tomato). Hex letters switches between #FF0000 and #ff0000.
  3. Search the table under the swatches by name or by code (slate, #FF6347, 255), sort it by any column, and use Copy all or Download (CSV or TXT) for every color of the open tab.
  4. To find the name or code of a color you already have, type it into Your colour (hex, rgb(), hsl(), oklch() or a name) or open the color picker. You get its HEX, RGB and HSL codes, the readable text color, the nearest web-safe color, the six nearest named colors and color: / background-color: lines and an HTML example to copy.

Type #3b82f6 into Your colour. The codes, the closest named colors and the code to paste are:

Input
#3b82f6
Output
HEX #3B82F6  RGB rgb(59, 130, 246)  HSL hsl(217, 91%, 60%)
Readable text: Black text 5.70:1
Nearest web-safe: #3399FF
Nearest names: DodgerBlue #1E90FF (3.6), RoyalBlue #4169E1 (6.7), CornflowerBlue #6495ED (7.0)

color: #3B82F6;
background-color: #3B82F6;
border: 2px solid #3B82F6;
<p style="color: #3B82F6;">Coloured text</p>
<div style="background-color: #3B82F6; color: #000000;">Text on a coloured background</div>

What is the HTML color code for red?

Pure red is #FF0000, rgb(255, 0, 0) or simply red. Other named reds are crimson #DC143C, firebrick #B22222, darkred #8B0000, indianred #CD5C5C and salmon #FA8072; open the Red tab for all nine.

What is the hex code for black and white?

Black is #000000 and white is #FFFFFF. Near-whites such as snow #FFFAFA, whitesmoke #F5F5F5 and ghostwhite #F8F8FF are in the White tab; grays from gainsboro #DCDCDC to dimgray #696969 are in Gray.

How many color names does HTML have?

148 names in CSS Color Level 4, which HTML uses: the 147 of CSS3 plus rebeccapurple #663399, added in 2014. Nine colors have two spellings (seven gray / grey pairs, aqua and cyan, fuchsia and magenta), so there are 139 distinct colors.

How do I find the name of a color from its hex code?

Type the hex code into Your colour. If it is a CSS named color, its name shows; if not, the six closest named colors are listed with how far each is from yours.

How do I change the font color in HTML?

Use CSS: <span style="color: #FF6347;">text</span>, or a class in your stylesheet. Type the color into Your colour and the tool writes the color: and background-color: lines and an HTML example for you to copy.

Runs entirely in your browser. Nothing is uploaded.