The Colors Used by the Ten Most Popular Sites

#fff#000#767676#2d2d2d#bebebergba(0,0,0,.2)#ccc#c0c0c0#36c#4c4c4c#dd4b39#dd8e27#900#eeeblack#f5f5f5rgba(0,0,0,.12)#666#fef9db#4d90fergba(255,255,255,0.5)rgba(0,0,0,.1)#3079ed#dcdcdc#444#4787ed#2f5bb7#357ae8rgba(0,0,0,0.3)#f1f1f1#f8f8f8#fbfbfb#ffffff#c6c6c6#222rgba(0,0,0,.8)rgba(0,0,0,0)#ebebebrgba(0,0,0,.3)#00c#11c#551a8b#999#e62117RedBlackGoldPurple#666#767676#d00#f1f1f1#167ac6#b8b8b8#a11rgba(0,0,0,.8)#000#fffrgba(0,0,0,.6)#cfcfcfrgba(0,0,0,.7)#B20000rgba(255,255,255,.6)rgba(0,0,0,.85)#D80000#555#333#b91f1f#a11b1argba(0,0,0,.2)#b31217#921818#7a1515rgba(255,255,255,.25)rgba(0,0,0,.25)#f5d562#edc947#a55e1a#8a4f16#126db3#356d9b#4d6c2e#2c5b82#e8e8e8#f0f0f0rgba(0,0,0,.15)rgba(0,0,0,.1)#e2e2e2#222#cc181e#434343#464646#7cabe3#535353#343434#d3d3d3#eee#ddd#444#73c421#757575#2793e6#e6bc27#ccc#777#8e8e8e#1b1b1brgba(0,0,0,0.5)#efefefrgba(0,0,0,0.05)rgba(27,127,204,0.4)#c6c6c6rgba(0,0,0,0.10)#e9e9e9#b9b9b9#e5e5e5#f8f8f8#095b99#990c11#3c3c3c#1a1a1a#6f6f6f#4d4d3d#61ad15#54900f#478509#ebebeb#fefefe#bfbfbf#f6f6f6#ededed#54990f#fafafa#737373#c5c5c5rgba(0,0,0,.18)#e52d27rgba(0,0,0,.05)rgba(255,255,255,.5)#fffcfc#fff8f8#fcfcfc#36649c#4496e7#fbfbfbrgba(0,0,0,.4)#4285f4#999#036rgba(0,0,0,.5)#aaa#4272db#3d3d3d#03a9f4whiteblackrgba(0,0,0,.3)#e6e6e6#f00#f60#fcf4d8#888#dbe4eb#128ee9rgba(180,180,180,0.5)white#def0ff#008bec#d5d5d5rgba(0,0,0,0.1)rgba(0,0,0,0.2)#808080#408#03c#eff4fcrgba(0,0,0,0.12)rgba(0,0,0,0.24)#bababargba(255,255,255,0.5)#8d8d8drgba(0,0,0,.24)#505050#262626#383838#131313#ff3838#ff1313#3a3a3argba(27,127,204,.8)#1b6ba8#c03636#525252#cacaca#2a2a2argba(0,0,0,0.7)#c95145#913d37#1c62b9#dfdfdf#7e7e7e#fff8e0#e3e3e3rgba(238,238,238,.6)#f5f6ce#bbb#427fed#3a75d6#d1d1d1#1b7fcc#e9eceergba(102,102,102,0.5)black#979797#feergba(0,0,0,0.3)#eaeaea#e0e0e0#980000rgba(0,0,0,0.4)#adadad#74a446#4d7730#443393#b21f70#e57a27#e5bc24#0e9151#287ec2#f5f5f5#cb4437#f6f5f6#bebebergba(0,0,0,.199219)#fef9db#36c#dadadargba(0,0,0,0.17)rgba(0,0,0,0.25)#5f8fbf#6f9fcf#6898c9rgba(1,1,1,.5)#dcdcdc#cecece#e9ebee#fff#f6f7f9#dddfe2#666#bdc7d8#0e1f5b#d9dfea#3b5998#999#000#e7e7e7#ffffff#1d2129#365899#777#d9d9d9#facgray#737373#ccc#6d84b4#f03d25#f2f2f2#333#edeff4#d8dfea#ffebe8#dd3c10#fff9d7#e2c822rgba(255,255,255,.85)rgba(59,89,153,.65)#90949c#ced0d4#bec2c9#4b4f56rgba(255,255,255,.8)#a5a5a5rgba(0,0,0,.35)rgba(249,250,252,.9)rgba(59,89,152,.5)rgba(180,180,180,.8)rgba(0,0,0,.05)rgba(0,0,0,.02)rgba(0,0,0,.08)#42b72a#36a420#2b9217#ace0a2#4267b2#29487d#9cb4d8#4080ff#7596c8#ededed#162643#aaa#e9e9e9#7f7f7f#577fbcrgba(0,0,0,.15)#fa3e3ergba(88,144,255,.75)rgba(0,0,0,.4)#e5e6e9#dfe0e4#d0d1d5#e5e5e5#d3d6db#f99#fcc#1d2a5b#96a6c5#c4d2e7#4e69a2#133783#0000cc#666#00c#333white#38f#fff#f60#b8b8b8#ccc#999#b3b3b3#4791ff#2e82ff#2975e5#317ef3#2868c8#3075dc#2964bbrgba(0,0,0,0.2)#d1d1d1#000#388bff#def#9b9b9b#ebebeb#ededed#f0f0f0#7a77c8#e6e6e6#7b7b7b#f1f1f1#2b99ff#e7e7e7#f9f9f9#fafafa#ffffff#400090#fff#0078ff#d9d9db#000GoldGold#e0e4e9#f1f1f5#e2e2e6#f1f2f5#4c00c3#188fff#b9bdc5#008cff#f90000#ff1d68#e23d98#e50ebd#cc0aed#900aef#5e0df9#1e2ff9#0079fc#12a4dd#959595#ffca16#ededed#d6d6da#dfdfdf#b0b0b0#949494#0179ff#5701ed#020e65#0f69ff#6001d2#4d00ae#8865f4#6700ff#0081f2#722cec#8c0d0d#d9272e#565656#009fdb#ea7400#a80309#cd040b#666#f2f2f2#dd4d31rgba(255,255,255,.5)#ff333a#ff00ba#2d1152#f0162f#5b01ca#5202b4#400190#8099ff#6454d7#43474a#6d00f6#c2deff#ff4c4c#ff4cb2#da3df2#884bfa#459cff#ff4c8b#f549d8#aa48f0#5a5dfa#29b1e3#deebfe#26282argba(0,0,0,.5)#f3effa#fcf8e3#5f5f5f#f9f9f9#0081ff#fef5d9#015eff#145aff#2294ff#158cfd#eee#f5f5f8rgba(0,0,0,.08)rgba(0,0,0,.2)rgba(0,0,0,.24)#0036ab#0042ab#003e98rgba(0,0,0,.25)rgba(0,0,0,.4)#ca6604#0481b0#333#474747#540808#007ef6#35465c#3b5998#55acee#f23347#8d8d8d#d8dade#000767#c0c3ca#ff1f1f#ff0091#d31bf1#6b20f9#2087ff#ff015c#f407cb#991ef0#4446fa#15abe3#21d87d#00b9f1#7300ff#00cd7a#ff4d52#f80e5d#30d3b6#6d36f6#ffd333#ffb700#ff8b12#b8007d#96989f#888#7200ff#bcbcbc#6e329d#464e56#080#c00#e91857#ff7617#ff520d#cc008c#003abc#ff7b12#be0067#b2b2b2#fdbf2d#9ea2af#cdcdcd#ababab#707070#1d1da3#353535#124bcb#33b6ff#afafaf#333333#3fc0fa#198fff#194bfa#063a93#560d60#fe4e4d#5dc3bbrgba(0,0,0,.9)#3c3c5b#feargba(0,120,255,0.9)rgba(41,137,216,0.94)rgba(64,0,144,1)rgba(64,0,144,0)#e60078#004000#f0f0f0rgba(0,0,0,.7)rgba(255,255,255,0.7)white#0046a9#fd6867#98836c#ff8c13#0d9af8#34cd5e#2fa198#0880e3#fa0027#cb008b#940050#ff1032#306rgba(0,70,169,0.8)rgba(253,104,103,0.8)rgba(152,131,108,0.8)rgba(0,205,122,0.8)rgba(255,140,19,0.8)rgba(13,154,248,0.8)rgba(52,205,94,0.8)rgba(47,161,152,0.8)rgba(64,0,144,0.8)rgba(25,143,255,0.8)rgba(190,0,103,0.8)rgba(8,128,227,0.8)rgba(248,14,93,0.8)rgba(48,211,182,0.8)rgba(250,0,39,0.8)rgba(203,0,139,0.8)rgba(148,0,80,0.8)rgba(255,16,50,0.8)rgba(51,0,102,0.8)rgba(255,255,255,0.6)rgba(0,9,30,0.20)rgba(0,9,30,0.10)rgba(255,255,255,1)rgba(255,255,255,0)#3d00a4rgba(0,0,0,.40)#787d82#8a8a8a#262626#324fe1rgba(82,168,236,.8)rgba(0,0,0,.075)rgba(82,168,236,.6)#ccc#ddd#ececec#f5f5fa#fafafc#f5f5f5#565c68#e6e6e6#d4d5d7rgba(0,0,0,.1)#3261c3#3b2eca#4ab5f7#35a2ec#2e9ee7#299de5#6c4988#582880#3e1c58#321c59#6f6b83#a298c2#da4f49#49afcd#5bc0de#2f96b4#1f6377#5bb75b#62c462#51a351#387038#faa732#fbb450#f89406#ad6704#363636#444#222rgba(0,0,0,.72)rgba(255,255,255,.72)rgba(255,255,255,.95)#054697#2d62ad#6d329c#6362ff#2ca9e1#2a3c53#3e5a70rgba(255,255,255,.3)rgba(255,255,255,.2)#abaeb7#4255b5#bca1d2#4f369b#08c#d9d9d9rgba(34,25,25,.1)rgba(255,255,255,.8)#7F0000rgba(0,0,0,.75)rgba(0,0,0,0)rgba(0,0,0,.95)#000000#a60000#111rgba(0,0,0,.8)#dff0d8#f2dede#d9edf7#ffc208#1e7d8e#178817#0069aa#7690fa#cd171c#737373#8d919d#9e45e3#32007f#fafaff#e9e9f2#58c345#3c5799#b94a48#c09853#3a87adrgba(0,0,0,.3)#e5e5e5#999rgba(64,0,144,.3)#5d8600#cc171b#3f3f3frgba(137,137,137,.75)#d9edf8#96c390#e0a4a4#dff0d6#aad190#fcf8e1#e0cc75#ceced6#7590f5#152756#26376a#192446#0e2b5c#3f5baf#555#3775dd#3455c1rgba(92,195,244,.8)#e04544#6e309d#b68ee7#B20000#a6c5ff#e2e2e2#0f0790#684599#1da09c#1a7f70#50a19e#f24130#cc2b2b#F26255#f26255#5900c8#24928e#ef4338#cecece#cc2a2a#187e70#f48177#f1402f#73b4b1#e4e4ec#500095#5a75ff#5771ff#ebe8ee#6d329d#e5e5e6#e7e7e8rgba(0,136,204,.1)#f2f2f9#fcfcfcrgba(0,0,0,.025)rgba(153,153,153,.9)#454545redrgba(255,0,0,.9)#c60000#ff0silver#FFF#CCC#c6d7ffrgba(0,0,0,0.65)rgba(0,0,0,0.85)rgba(255,255,255,0.005)rgba(255,255,255,0.90)rgba(255,255,255,0.99)#1AC567#F0162F#ff0#000silver#fff#555#cdcdcd#ebebebrgba(0,0,0,.2)#d9d9d9#ddd#00af89rgba(0,171,137,.1)#1900abrgba(0,89,70,.5)#005946#008064#d11d13#73100argba(209,29,19,.1)#19d11drgba(115,16,10,.5)#8c130d#165c91#18649e#134e7b#ccc#347bff#eaeded#cad2d3#eee#777#b94a48#e9322d#333#e5e5e5#666#0645adrgba(0,0,0,0)#f9f9f9#696969rgba(255,255,255,0)#f0f0f0#aaa#520#e4e4e4#e8e8e8#cececesilver#b0b0b0#afd3f5#2962cc#ff9900white#E47923#333333#333#fff#111#3f6998rgba(255,255,255,0)#ddd#3e4650#f3f3f3#f6f6f6#555#767676#c45500#e77600#0066c0#b12704#008a00#d00#e7e9ec#adb1b8#a2a6ac#8d9096#eff0f3#f7f8fa#e0e3e8#e7eaf0#d9dce1rgba(0,0,0,.2)#dcdfe3#979aa1#82858argba(228,121,17,.5)rgba(255,255,255,.6)#eaecee#fef8f2#8c8c8c#e7e7e7#e0e0e0#f9f3e5#999#f0c14b#a88734#9c7e31#846a29#f3d078#f7dfa5#f1c860#f5d78e#eeb933#e8e0cdrgba(255,255,255,.4)#444c55#3d444c#2f353b#2c3137#5b626a#72787f#4f555c#666b72#393f47#32373e#24282d#212429rgba(255,255,255,.15)rgba(0,0,0,.25)#ed9220#ca7c1b#be751a#a56616#f1ad57#f6c88f#eaa044#f4bc77#e18512#b26d18#9a5f15#cdcda1#8f8f70#858569#717158#d9d9b8#e6e6d0#d0d0a7#ddddbf#c4c490#7b7b61#666650#adb2bb#bababa#d1d1d1#cecece#d8dde6rgba(186,186,186,.5)#919191#dee2ea#f0f0f0rgba(255,255,255,.5)#f8f8f8#eee#eeeeee#d8d8d8#c40000#fcf4f4#bbd3de#2b2b2b#7fc87f#dff7df#007600#8b6e00#fffae7#7c6200#4d4d4drgba(0,0,0,.14)rgba(0,0,0,.03)#d4d4d4rgba(0,0,0,.17)#949494#f2f2f2#ffba00#ffce00#ffa700rgba(255,255,255,.25)#b3b3b3#bcbcbc#aaa#aaaaaa#ffdc99#faf1da#ffcf75#ffd88f#ffc75crgba(0,0,0,.4)rgba(0,0,0,.1)rgba(0,0,0,.05)#e9e9e9#eaeaea#6c6e73#a6a6a6rgba(0,0,0,.07)rgba(221,0,0,.1)#f9f9f9#cdcdcdrgba(0,0,0,.13)#f7f7f7#000rgba(0,0,0,.75)#00FFFF#a95b0e#c06710#d2d5db#b7babe#ad5800#b95e00#cf6a00#f5f6f9#eff1f3rgba(0,0,0,.15)rgba(0,0,0,.025)#444#F5F5F5#cccrgba(19,19,4,.04)#888#888888#247bbd#DDD#FFF#bbb#a50200#cb0400#d6d6d6#606060#e47911#05a#c89411#b0820f#99710d#fcf3dc#f3ce72#FFF8E3#FFEEBA#f8e3ad#eeba37#f1c65a#FFF6DA#FFECB2#f6da95#ecb21f#48A3C6#666#CCC#6e6e6e#004B91#090#fafafa#f90#a0a0a0#E47911#efefef#F3F3F3#232f3e#37475a#485769#3a4553#131a22#B51A1A#1C673C#AB8E53#bdbdbd#777#485059#363c43#EEE#146EB4#AAA#C60#509c26orange#05A#f1f1f1#CACACA#222F3F#a8acb2#BBB#febd69#ff9a01#f4f4f4#C8C8C8#F0F0F0#f08804#dadada#f3a847#a7acb2#48a3c6#4f5965#f79b00#19222d#9aa0a9#4D9C2D#9C3#c90#ffe093#ADB1B8#A2A6AC#8D9096#848688#fff#777#000#767676#2d2d2d#bebebergba(0,0,0,.2)#ccc#c0c0c0#36c#4c4c4c#dd4b39#dd8e27#900#eeeblack#f5f5f5rgba(0,0,0,.12)#666#fef9db#4d90fergba(255,255,255,0.5)rgba(0,0,0,.1)#3079ed#dcdcdc#444#4787ed#2f5bb7#357ae8rgba(0,0,0,0.3)#f1f1f1#f8f8f8#fbfbfb#ffffff#c6c6c6#222rgba(0,0,0,.8)rgba(0,0,0,0)#ebebebrgba(0,0,0,.3)#00c#11c#551a8b#999#0873c0#fff#172c45#cd0200#bd0a01#000#6daaea#3b639f#8c8c8c#3B639F#c1c4cb#3297d8#a8a8a8#edf3fc#6994c1#cdcdcd#374562#f7f7f7#a9bacd#333#f4f4f4#cce5f5#328cc9#0d519c#cae1ee#fc0#dbdbdb#6b6b6b#FBFBFB#deeaf8#7db0df#cde0f6#488fd1#9da9b4#c8dcf2#74808f#458fce#bdd7f2#BDD7F2#f2f2f2#cfdcea#444#ef5814#dbecec#669fe6#d2e1f1#fcfcfc#6f99c4#f5f8fc#ee5738#D4D4D4#A0A0A0#dde7f2#41a98d#9DA9B4#f14e4e#2e9d24#2D374B#323f5a#666#d1dfea#2d374b#8c97a8#c6c6c6#f1f1f1#1b1b1b#7793ba#4c6c9c#e4e9f0#fafbff#c3cdd9#999#fdfffe#fdfdfd#ebebeb#c7c7c7#f4f8fc#fffbef#f4d9a4#515151#BD0A01#D2D2D2#b2b2b2#dd933a#6186B5#F5F8FC#EAF1FA#F0F5FC#E1EAF7#4C6EA3#7a94b5#3fa0dd#469fe1#cdeaff#fcff00#ededed#c4dbed#c2c2c2#ddd#e36464#216baa#206bab#4697e6#8d91a0#b0b0b0#6f95ba#f7fafd#8191a3#7e889d#bac5cb#e4e4e4#e5e5e5#c5d3da#798ba5#294c7f#EDEDED#C4DBED#0850b2#5cb800#c7deed#eb2373#c1c1c1#a0a3a8#f3f3f3#2f92d3#00aced#55aceeBlack#ff0#000#c0c0c0#fff#292f33#1b95e0#666#66757f#999#eee#1da1f2#e95f28#8899a6#e81c4f#981ceb#fab81e#19cf86#aab8c2#77c7f7#ccd6dd#e1e8edrgba(0,0,0,0.1)#f5f8fargba(0,0,0,0.2)#ffcc4d#f1a02argba(255,255,255,0.5)#ec8b11#f2a330rgba(0,0,0,0.3)rgba(0,0,0,0)rgba(0,0,0,0.05)#000000#0C0000#3b88c3rgba(255,255,255,0.15)rgba(0,0,0,0.15)#260000#952f2argba(0,0,0,0.5)rgba(255,255,255,0.25)rgba(255,255,255,0)rgba(0,132,180,0.1)#00FFFF#190084rgba(255,255,255,0.75)#3c5d96#6079ab#3c5a98#273b64rgba(255,255,255,0.1)#345285#5e76a9#344d7ergba(0,132,180,0.8)white#019ad2rgba(255,255,255,0.98)rgba(0,0,0,0.25)#58b3f0#3aa0ea#111rgba(0,0,0,0.75)#3c8fc9#c00c0c#e9e9e9#f9f9f9#959595rgba(0,0,0,0.4)#33bcef#057ed0#ebebeb#f2f2f2#ffffff#aaaaaa#444rgba(0,0,0,0.55)#660000#aaa#0095ea#898989rgba(0,0,0,0.08)#b1bbc3#f7fcffrgba(82,168,236,0.6)rgba(255,255,255,0.97)rgba(102,117,127,0.6)#f7e8bc#fceec1rgba(0,0,0,0.03)#f3f9fe#8799a7#f6f6f6lightblue#778697rgba(1,1,1,0)#fff2cc#fcc#008db8#00a0d1#00A0D1#008DB8#00799e#2276bb#b2ebffrgba(245,248,250,0.75)#51b3f1#f1f1f1#333#c2ddf3#469ae9#ccc#56b4ef#7f7f7f#3b372e#f6d171rgba(0,0,0,0.33)#8799a5#3b88c8#abd9f5#ffdb99#ffb733#ffcd70#f59e00#f7ca77#f1a417#f4bb51#bf800c#555#858585#373737#428bca#357ebd#3276b1#285e8e#5c0002#d40d12#bbb#2eb7e5rgba(82,168,236,0.75)rgba(82,168,236,0.5)#992b41#dbdbdb#dadada#eeeeee#1a1a1a#edededwhite#fbdcb6#f6b462#f7f7f7#fff1ba#fee47f#0283b2#fac#6c9fd1#b2b2b2#7b7b7brgba(255,255,255,0.55)#292f29rgba(41,47,51,0.9)#E5292Frgba(41,47,51,0.6)rgba(0,0,0,0.8)rgba(32,47,51,0.2)#ebf0f3#feedba#ddd#dddddd#dd2e44#8abcdergba(0,0,0,0.498039)#f4f5f7#0086cd#6fb9e6#4d8fcc#3e7cbd#afdffb#3d6072#ffe9b5#f0f0f0#98a1a4#fcdd92blackrgba(0,0,0,0.45)#8798a5#292f31#a94442rgba(0,0,0,0.7)#eff7ffrgba(0,0,0,0.35)rgba(102,117,127,0.8)#4489be#cf4f53rgba(86,60,43,0.75)#0481b1#2daddc#0271bf#be4242#9d1c1d#971c13#7d1811#a09d9drgba(255,255,255,0.6)#222#e8f6ffrgba(136,201,249,0.6)rgba(0,0,0,0.166)#269#50aaf0rgba(255,255,255,1)rgba(136,153,166,0.15)#63aeee#e1e8eeblack#667585#a8b6c0#8599a7#17bf63#68e090#ffad1f#ffd03f#e0245e#f6809a#794bc4#a37ced#f45d22#ff8d57#61bcf6rgba(255,255,255,0.3)#edf0f3rgba(0,0,0,0.6)rgba(255,255,255,0.8)#fc0#f4f4f4#292929#882811#aa0030#0067c8#343841#4e4a40#27506c#a21700#dcb100#0667c8rgba(255,255,255,0.35)rgba(255,190,43,0.35)#fa2rgba(20,20,20,0.9)#fec632#75c6f7#6fa3c4#fd9a0f#fee94f#fd9512#fedc4drgba(29,161,242,0.1)rgba(255,255,255,0.4)rgba(0,0,0,1)rgba(0,0,0,0.02)#d3d3d3#e6e6e6#212121#fcefa1#fbf9ee#363636#cd0a0a#fef1ec#e0e0e0#c5c5c5

I was curious what colors were being used by large, popular sites, so I decided to find out.

Alexa.com maintains a list of the most visited sites on the internet. I wrote a PHP script to scrape the ten most popular sites and record all the colors used in the sites' home pages and style sheets.

I plan to rescrape the data on a regular basis. Because of this, I'll keep analysis to a minimum, since it could become outdated when the data changes. Once I have data over a larger time period I'll be able to examine and graph trends in web development. I also plan to examine the difference in color usage between popular websites from different parts of the world.

This data is current as of September 18th, 2016.

NOTE: This visualization doesn't include colors used in images, only CSS and HTML color codes. For a full list of caveats click here.

The Sites

Here are the ten most popular sites, and the colors that they use. Duplicates were removed on a per site basis. However, if a site used the same color in multiple formats, each format is included. For example, if they used #000, #000000, and black, each would be included separately.

Mouse over colors to see their color codes. Click on a site for a breakdown of the colors that site uses.

#fff#000#767676#2d2d2d#bebebergba(0,0,0,.2)#ccc#c0c0c0#36c#4c4c4c#dd4b39#dd8e27#900#eeeblack#f5f5f5rgba(0,0,0,.12)#666#fef9db#4d90fergba(255,255,255,0.5)rgba(0,0,0,.1)#3079ed#dcdcdc#444#4787ed#2f5bb7#357ae8rgba(0,0,0,0.3)#f1f1f1#f8f8f8#fbfbfb#ffffff#c6c6c6#222rgba(0,0,0,.8)rgba(0,0,0,0)#ebebebrgba(0,0,0,.3)#00c#11c#551a8b#999
#e62117RedBlackGoldPurple#666#767676#d00#f1f1f1#167ac6#b8b8b8#a11rgba(0,0,0,.8)#000#fffrgba(0,0,0,.6)#cfcfcfrgba(0,0,0,.7)#B20000rgba(255,255,255,.6)rgba(0,0,0,.85)#D80000#555#333#b91f1f#a11b1argba(0,0,0,.2)#b31217#921818#7a1515rgba(255,255,255,.25)rgba(0,0,0,.25)#f5d562#edc947#a55e1a#8a4f16#126db3#356d9b#4d6c2e#2c5b82#e8e8e8#f0f0f0rgba(0,0,0,.15)rgba(0,0,0,.1)#e2e2e2#222#cc181e#434343#464646#7cabe3#535353#343434#d3d3d3#eee#ddd#444#73c421#757575#2793e6#e6bc27#ccc#777#8e8e8e#1b1b1brgba(0,0,0,0.5)#efefefrgba(0,0,0,0.05)rgba(27,127,204,0.4)#c6c6c6rgba(0,0,0,0.10)#e9e9e9#b9b9b9#e5e5e5#f8f8f8#095b99#990c11#3c3c3c#1a1a1a#6f6f6f#4d4d3d#61ad15#54900f#478509#ebebeb#fefefe#bfbfbf#f6f6f6#ededed#54990f#fafafa#737373#c5c5c5rgba(0,0,0,.18)#e52d27rgba(0,0,0,.05)rgba(255,255,255,.5)#fffcfc#fff8f8#fcfcfc#36649c#4496e7#fbfbfbrgba(0,0,0,.4)#4285f4#999#036rgba(0,0,0,.5)#aaa#4272db#3d3d3d#03a9f4whiteblackrgba(0,0,0,.3)#e6e6e6#f00#f60#fcf4d8#888#dbe4eb#128ee9rgba(180,180,180,0.5)white#def0ff#008bec#d5d5d5rgba(0,0,0,0.1)rgba(0,0,0,0.2)#808080#408#03c#eff4fcrgba(0,0,0,0.12)rgba(0,0,0,0.24)#bababargba(255,255,255,0.5)#8d8d8drgba(0,0,0,.24)#505050#262626#383838#131313#ff3838#ff1313#3a3a3argba(27,127,204,.8)#1b6ba8#c03636#525252#cacaca#2a2a2argba(0,0,0,0.7)#c95145#913d37#1c62b9#dfdfdf#7e7e7e#fff8e0#e3e3e3rgba(238,238,238,.6)#f5f6ce#bbb#427fed#3a75d6#d1d1d1#1b7fcc#e9eceergba(102,102,102,0.5)black#979797#feergba(0,0,0,0.3)#eaeaea#e0e0e0#980000rgba(0,0,0,0.4)#adadad#74a446#4d7730#443393#b21f70#e57a27#e5bc24#0e9151#287ec2#f5f5f5#cb4437#f6f5f6#bebebergba(0,0,0,.199219)#fef9db#36c#dadadargba(0,0,0,0.17)rgba(0,0,0,0.25)#5f8fbf#6f9fcf#6898c9rgba(1,1,1,.5)#dcdcdc#cecece
#e9ebee#fff#f6f7f9#dddfe2#666#bdc7d8#0e1f5b#d9dfea#3b5998#999#000#e7e7e7#ffffff#1d2129#365899#777#d9d9d9#facgray#737373#ccc#6d84b4#f03d25#f2f2f2#333#edeff4#d8dfea#ffebe8#dd3c10#fff9d7#e2c822rgba(255,255,255,.85)rgba(59,89,153,.65)#90949c#ced0d4#bec2c9#4b4f56rgba(255,255,255,.8)#a5a5a5rgba(0,0,0,.35)rgba(249,250,252,.9)rgba(59,89,152,.5)rgba(180,180,180,.8)rgba(0,0,0,.05)rgba(0,0,0,.02)rgba(0,0,0,.08)#42b72a#36a420#2b9217#ace0a2#4267b2#29487d#9cb4d8#4080ff#7596c8#ededed#162643#aaa#e9e9e9#7f7f7f#577fbcrgba(0,0,0,.15)#fa3e3ergba(88,144,255,.75)rgba(0,0,0,.4)#e5e6e9#dfe0e4#d0d1d5#e5e5e5#d3d6db#f99#fcc#1d2a5b#96a6c5#c4d2e7#4e69a2#133783
#0000cc#666#00c#333white#38f#fff#f60#b8b8b8#ccc#999#b3b3b3#4791ff#2e82ff#2975e5#317ef3#2868c8#3075dc#2964bbrgba(0,0,0,0.2)#d1d1d1#000#388bff#def#9b9b9b#ebebeb#ededed#f0f0f0#7a77c8#e6e6e6#7b7b7b#f1f1f1#2b99ff#e7e7e7#f9f9f9#fafafa
#ffffff#400090#fff#0078ff#d9d9db#000GoldGold#e0e4e9#f1f1f5#e2e2e6#f1f2f5#4c00c3#188fff#b9bdc5#008cff#f90000#ff1d68#e23d98#e50ebd#cc0aed#900aef#5e0df9#1e2ff9#0079fc#12a4dd#959595#ffca16#ededed#d6d6da#dfdfdf#b0b0b0#949494#0179ff#5701ed#020e65#0f69ff#6001d2#4d00ae#8865f4#6700ff#0081f2#722cec#8c0d0d#d9272e#565656#009fdb#ea7400#a80309#cd040b#666#f2f2f2#dd4d31rgba(255,255,255,.5)#ff333a#ff00ba#2d1152#f0162f#5b01ca#5202b4#400190#8099ff#6454d7#43474a#6d00f6#c2deff#ff4c4c#ff4cb2#da3df2#884bfa#459cff#ff4c8b#f549d8#aa48f0#5a5dfa#29b1e3#deebfe#26282argba(0,0,0,.5)#f3effa#fcf8e3#5f5f5f#f9f9f9#0081ff#fef5d9#015eff#145aff#2294ff#158cfd#eee#f5f5f8rgba(0,0,0,.08)rgba(0,0,0,.2)rgba(0,0,0,.24)#0036ab#0042ab#003e98rgba(0,0,0,.25)rgba(0,0,0,.4)#ca6604#0481b0#333#474747#540808#007ef6#35465c#3b5998#55acee#f23347#8d8d8d#d8dade#000767#c0c3ca#ff1f1f#ff0091#d31bf1#6b20f9#2087ff#ff015c#f407cb#991ef0#4446fa#15abe3#21d87d#00b9f1#7300ff#00cd7a#ff4d52#f80e5d#30d3b6#6d36f6#ffd333#ffb700#ff8b12#b8007d#96989f#888#7200ff#bcbcbc#6e329d#464e56#080#c00#e91857#ff7617#ff520d#cc008c#003abc#ff7b12#be0067#b2b2b2#fdbf2d#9ea2af#cdcdcd#ababab#707070#1d1da3#353535#124bcb#33b6ff#afafaf#333333#3fc0fa#198fff#194bfa#063a93#560d60#fe4e4d#5dc3bbrgba(0,0,0,.9)#3c3c5b#feargba(0,120,255,0.9)rgba(41,137,216,0.94)rgba(64,0,144,1)rgba(64,0,144,0)#e60078#004000#f0f0f0rgba(0,0,0,.7)rgba(255,255,255,0.7)white#0046a9#fd6867#98836c#ff8c13#0d9af8#34cd5e#2fa198#0880e3#fa0027#cb008b#940050#ff1032#306rgba(0,70,169,0.8)rgba(253,104,103,0.8)rgba(152,131,108,0.8)rgba(0,205,122,0.8)rgba(255,140,19,0.8)rgba(13,154,248,0.8)rgba(52,205,94,0.8)rgba(47,161,152,0.8)rgba(64,0,144,0.8)rgba(25,143,255,0.8)rgba(190,0,103,0.8)rgba(8,128,227,0.8)rgba(248,14,93,0.8)rgba(48,211,182,0.8)rgba(250,0,39,0.8)rgba(203,0,139,0.8)rgba(148,0,80,0.8)rgba(255,16,50,0.8)rgba(51,0,102,0.8)rgba(255,255,255,0.6)rgba(0,9,30,0.20)rgba(0,9,30,0.10)rgba(255,255,255,1)rgba(255,255,255,0)#3d00a4rgba(0,0,0,.40)#787d82#8a8a8a#262626#324fe1rgba(82,168,236,.8)rgba(0,0,0,.075)rgba(82,168,236,.6)#ccc#ddd#ececec#f5f5fa#fafafc#f5f5f5#565c68#e6e6e6#d4d5d7rgba(0,0,0,.1)#3261c3#3b2eca#4ab5f7#35a2ec#2e9ee7#299de5#6c4988#582880#3e1c58#321c59#6f6b83#a298c2#da4f49#49afcd#5bc0de#2f96b4#1f6377#5bb75b#62c462#51a351#387038#faa732#fbb450#f89406#ad6704#363636#444#222rgba(0,0,0,.72)rgba(255,255,255,.72)rgba(255,255,255,.95)#054697#2d62ad#6d329c#6362ff#2ca9e1#2a3c53#3e5a70rgba(255,255,255,.3)rgba(255,255,255,.2)#abaeb7#4255b5#bca1d2#4f369b#08c#d9d9d9rgba(34,25,25,.1)rgba(255,255,255,.8)#7F0000rgba(0,0,0,.75)rgba(0,0,0,0)rgba(0,0,0,.95)#000000#a60000#111rgba(0,0,0,.8)#dff0d8#f2dede#d9edf7#ffc208#1e7d8e#178817#0069aa#7690fa#cd171c#737373#8d919d#9e45e3#32007f#fafaff#e9e9f2#58c345#3c5799#b94a48#c09853#3a87adrgba(0,0,0,.3)#e5e5e5#999rgba(64,0,144,.3)#5d8600#cc171b#3f3f3frgba(137,137,137,.75)#d9edf8#96c390#e0a4a4#dff0d6#aad190#fcf8e1#e0cc75#ceced6#7590f5#152756#26376a#192446#0e2b5c#3f5baf#555#3775dd#3455c1rgba(92,195,244,.8)#e04544#6e309d#b68ee7#B20000#a6c5ff#e2e2e2#0f0790#684599#1da09c#1a7f70#50a19e#f24130#cc2b2b#F26255#f26255#5900c8#24928e#ef4338#cecece#cc2a2a#187e70#f48177#f1402f#73b4b1#e4e4ec#500095#5a75ff#5771ff#ebe8ee#6d329d#e5e5e6#e7e7e8rgba(0,136,204,.1)#f2f2f9#fcfcfcrgba(0,0,0,.025)rgba(153,153,153,.9)#454545redrgba(255,0,0,.9)#c60000#ff0silver#FFF#CCC#c6d7ffrgba(0,0,0,0.65)rgba(0,0,0,0.85)rgba(255,255,255,0.005)rgba(255,255,255,0.90)rgba(255,255,255,0.99)#1AC567#F0162F
#ff0#000silver#fff#555#cdcdcd#ebebebrgba(0,0,0,.2)#d9d9d9#ddd#00af89rgba(0,171,137,.1)#1900abrgba(0,89,70,.5)#005946#008064#d11d13#73100argba(209,29,19,.1)#19d11drgba(115,16,10,.5)#8c130d#165c91#18649e#134e7b#ccc#347bff#eaeded#cad2d3#eee#777#b94a48#e9322d#333#e5e5e5#666#0645adrgba(0,0,0,0)#f9f9f9#696969rgba(255,255,255,0)#f0f0f0#aaa#520#e4e4e4#e8e8e8#cececesilver#b0b0b0#afd3f5#2962cc
#ff9900white#E47923#333333#333#fff#111#3f6998rgba(255,255,255,0)#ddd#3e4650#f3f3f3#f6f6f6#555#767676#c45500#e77600#0066c0#b12704#008a00#d00#e7e9ec#adb1b8#a2a6ac#8d9096#eff0f3#f7f8fa#e0e3e8#e7eaf0#d9dce1rgba(0,0,0,.2)#dcdfe3#979aa1#82858argba(228,121,17,.5)rgba(255,255,255,.6)#eaecee#fef8f2#8c8c8c#e7e7e7#e0e0e0#f9f3e5#999#f0c14b#a88734#9c7e31#846a29#f3d078#f7dfa5#f1c860#f5d78e#eeb933#e8e0cdrgba(255,255,255,.4)#444c55#3d444c#2f353b#2c3137#5b626a#72787f#4f555c#666b72#393f47#32373e#24282d#212429rgba(255,255,255,.15)rgba(0,0,0,.25)#ed9220#ca7c1b#be751a#a56616#f1ad57#f6c88f#eaa044#f4bc77#e18512#b26d18#9a5f15#cdcda1#8f8f70#858569#717158#d9d9b8#e6e6d0#d0d0a7#ddddbf#c4c490#7b7b61#666650#adb2bb#bababa#d1d1d1#cecece#d8dde6rgba(186,186,186,.5)#919191#dee2ea#f0f0f0rgba(255,255,255,.5)#f8f8f8#eee#eeeeee#d8d8d8#c40000#fcf4f4#bbd3de#2b2b2b#7fc87f#dff7df#007600#8b6e00#fffae7#7c6200#4d4d4drgba(0,0,0,.14)rgba(0,0,0,.03)#d4d4d4rgba(0,0,0,.17)#949494#f2f2f2#ffba00#ffce00#ffa700rgba(255,255,255,.25)#b3b3b3#bcbcbc#aaa#aaaaaa#ffdc99#faf1da#ffcf75#ffd88f#ffc75crgba(0,0,0,.4)rgba(0,0,0,.1)rgba(0,0,0,.05)#e9e9e9#eaeaea#6c6e73#a6a6a6rgba(0,0,0,.07)rgba(221,0,0,.1)#f9f9f9#cdcdcdrgba(0,0,0,.13)#f7f7f7#000rgba(0,0,0,.75)#00FFFF#a95b0e#c06710#d2d5db#b7babe#ad5800#b95e00#cf6a00#f5f6f9#eff1f3rgba(0,0,0,.15)rgba(0,0,0,.025)#444#F5F5F5#cccrgba(19,19,4,.04)#888#888888#247bbd#DDD#FFF#bbb#a50200#cb0400#d6d6d6#606060#e47911#05a#c89411#b0820f#99710d#fcf3dc#f3ce72#FFF8E3#FFEEBA#f8e3ad#eeba37#f1c65a#FFF6DA#FFECB2#f6da95#ecb21f#48A3C6#666#CCC#6e6e6e#004B91#090#fafafa#f90#a0a0a0#E47911#efefef#F3F3F3#232f3e#37475a#485769#3a4553#131a22#B51A1A#1C673C#AB8E53#bdbdbd#777#485059#363c43#EEE#146EB4#AAA#C60#509c26orange#05A#f1f1f1#CACACA#222F3F#a8acb2#BBB#febd69#ff9a01#f4f4f4#C8C8C8#F0F0F0#f08804#dadada#f3a847#a7acb2#48a3c6#4f5965#f79b00#19222d#9aa0a9#4D9C2D#9C3#c90#ffe093#ADB1B8#A2A6AC#8D9096#848688
#fff#777#000#767676#2d2d2d#bebebergba(0,0,0,.2)#ccc#c0c0c0#36c#4c4c4c#dd4b39#dd8e27#900#eeeblack#f5f5f5rgba(0,0,0,.12)#666#fef9db#4d90fergba(255,255,255,0.5)rgba(0,0,0,.1)#3079ed#dcdcdc#444#4787ed#2f5bb7#357ae8rgba(0,0,0,0.3)#f1f1f1#f8f8f8#fbfbfb#ffffff#c6c6c6#222rgba(0,0,0,.8)rgba(0,0,0,0)#ebebebrgba(0,0,0,.3)#00c#11c#551a8b#999
#0873c0#fff#172c45#cd0200#bd0a01#000#6daaea#3b639f#8c8c8c#3B639F#c1c4cb#3297d8#a8a8a8#edf3fc#6994c1#cdcdcd#374562#f7f7f7#a9bacd#333#f4f4f4#cce5f5#328cc9#0d519c#cae1ee#fc0#dbdbdb#6b6b6b#FBFBFB#deeaf8#7db0df#cde0f6#488fd1#9da9b4#c8dcf2#74808f#458fce#bdd7f2#BDD7F2#f2f2f2#cfdcea#444#ef5814#dbecec#669fe6#d2e1f1#fcfcfc#6f99c4#f5f8fc#ee5738#D4D4D4#A0A0A0#dde7f2#41a98d#9DA9B4#f14e4e#2e9d24#2D374B#323f5a#666#d1dfea#2d374b#8c97a8#c6c6c6#f1f1f1#1b1b1b#7793ba#4c6c9c#e4e9f0#fafbff#c3cdd9#999#fdfffe#fdfdfd#ebebeb#c7c7c7#f4f8fc#fffbef#f4d9a4#515151#BD0A01#D2D2D2#b2b2b2#dd933a#6186B5#F5F8FC#EAF1FA#F0F5FC#E1EAF7#4C6EA3#7a94b5#3fa0dd#469fe1#cdeaff#fcff00#ededed#c4dbed#c2c2c2#ddd#e36464#216baa#206bab#4697e6#8d91a0#b0b0b0#6f95ba#f7fafd#8191a3#7e889d#bac5cb#e4e4e4#e5e5e5#c5d3da#798ba5#294c7f#EDEDED#C4DBED#0850b2#5cb800#c7deed#eb2373#c1c1c1#a0a3a8#f3f3f3#2f92d3
#00aced#55aceeBlack#ff0#000#c0c0c0#fff#292f33#1b95e0#666#66757f#999#eee#1da1f2#e95f28#8899a6#e81c4f#981ceb#fab81e#19cf86#aab8c2#77c7f7#ccd6dd#e1e8edrgba(0,0,0,0.1)#f5f8fargba(0,0,0,0.2)#ffcc4d#f1a02argba(255,255,255,0.5)#ec8b11#f2a330rgba(0,0,0,0.3)rgba(0,0,0,0)rgba(0,0,0,0.05)#000000#0C0000#3b88c3rgba(255,255,255,0.15)rgba(0,0,0,0.15)#260000#952f2argba(0,0,0,0.5)rgba(255,255,255,0.25)rgba(255,255,255,0)rgba(0,132,180,0.1)#00FFFF#190084rgba(255,255,255,0.75)#3c5d96#6079ab#3c5a98#273b64rgba(255,255,255,0.1)#345285#5e76a9#344d7ergba(0,132,180,0.8)white#019ad2rgba(255,255,255,0.98)rgba(0,0,0,0.25)#58b3f0#3aa0ea#111rgba(0,0,0,0.75)#3c8fc9#c00c0c#e9e9e9#f9f9f9#959595rgba(0,0,0,0.4)#33bcef#057ed0#ebebeb#f2f2f2#ffffff#aaaaaa#444rgba(0,0,0,0.55)#660000#aaa#0095ea#898989rgba(0,0,0,0.08)#b1bbc3#f7fcffrgba(82,168,236,0.6)rgba(255,255,255,0.97)rgba(102,117,127,0.6)#f7e8bc#fceec1rgba(0,0,0,0.03)#f3f9fe#8799a7#f6f6f6lightblue#778697rgba(1,1,1,0)#fff2cc#fcc#008db8#00a0d1#00A0D1#008DB8#00799e#2276bb#b2ebffrgba(245,248,250,0.75)#51b3f1#f1f1f1#333#c2ddf3#469ae9#ccc#56b4ef#7f7f7f#3b372e#f6d171rgba(0,0,0,0.33)#8799a5#3b88c8#abd9f5#ffdb99#ffb733#ffcd70#f59e00#f7ca77#f1a417#f4bb51#bf800c#555#858585#373737#428bca#357ebd#3276b1#285e8e#5c0002#d40d12#bbb#2eb7e5rgba(82,168,236,0.75)rgba(82,168,236,0.5)#992b41#dbdbdb#dadada#eeeeee#1a1a1a#edededwhite#fbdcb6#f6b462#f7f7f7#fff1ba#fee47f#0283b2#fac#6c9fd1#b2b2b2#7b7b7brgba(255,255,255,0.55)#292f29rgba(41,47,51,0.9)#E5292Frgba(41,47,51,0.6)rgba(0,0,0,0.8)rgba(32,47,51,0.2)#ebf0f3#feedba#ddd#dddddd#dd2e44#8abcdergba(0,0,0,0.498039)#f4f5f7#0086cd#6fb9e6#4d8fcc#3e7cbd#afdffb#3d6072#ffe9b5#f0f0f0#98a1a4#fcdd92blackrgba(0,0,0,0.45)#8798a5#292f31#a94442rgba(0,0,0,0.7)#eff7ffrgba(0,0,0,0.35)rgba(102,117,127,0.8)#4489be#cf4f53rgba(86,60,43,0.75)#0481b1#2daddc#0271bf#be4242#9d1c1d#971c13#7d1811#a09d9drgba(255,255,255,0.6)#222#e8f6ffrgba(136,201,249,0.6)rgba(0,0,0,0.166)#269#50aaf0rgba(255,255,255,1)rgba(136,153,166,0.15)#63aeee#e1e8eeblack#667585#a8b6c0#8599a7#17bf63#68e090#ffad1f#ffd03f#e0245e#f6809a#794bc4#a37ced#f45d22#ff8d57#61bcf6rgba(255,255,255,0.3)#edf0f3rgba(0,0,0,0.6)rgba(255,255,255,0.8)#fc0#f4f4f4#292929#882811#aa0030#0067c8#343841#4e4a40#27506c#a21700#dcb100#0667c8rgba(255,255,255,0.35)rgba(255,190,43,0.35)#fa2rgba(20,20,20,0.9)#fec632#75c6f7#6fa3c4#fd9a0f#fee94f#fd9512#fedc4drgba(29,161,242,0.1)rgba(255,255,255,0.4)rgba(0,0,0,1)rgba(0,0,0,0.02)#d3d3d3#e6e6e6#212121#fcefa1#fbf9ee#363636#cd0a0a#fef1ec#e0e0e0#c5c5c5

Colors by Hue

For the purposes of this chart, transparency was removed from all colors.

Colors by Format

Browsers recognize colors in seven different formats; hexadecimal, RGB, RGBA, HSL, HSLA, and predefined color names.

Colors by Hue and Then Saturation

Use this slider to change the background color and expose hidden colors.

In this fan chart, colors are organized around the circle by hue. Their distance from the center is determined by their saturation.

If a color was found more than once in the data it has a larger area. A color that was found three times has an area three times larger than a color that was found once. Colors had their hue, saturation and lightness rounded to the nearest integer. Transparency was removed.

Unfortunately, using this style of chart has one main disadvantage. Some colors become hidden under other colors.

Converting Between Color Formats

In order to organize this data for the above charts, I had to convert all the colors used into a single format. Here I'll explain the different color formats and how I converted them all to HSL.

Predefined Color Names

Browsers recognize certain predefined color names. 140 names are supported by all browsers. The names range from common words like white and red to stranger examples like LightGoldenRodYellow, PapayaWhip, IndianRed and AliceBlue. These color names are written without any spaces. They're case insensitive, so it does not matter how they are capitalized. View all predefined color names.

RGB (Red, Green, Blue)

Digital colors are made by combining different amounts of red, green and blue light. The amount of each color is represented by a number between 0 and 255.

This is how to write the RGB color format: rgb(186, 218, 85). The first number is red, the second is green and the third is blue.

RGBA (Red, Green, Blue, Alpha)

There's another version of RGB which is frequently used on the web. RGBA adds an additional parameter; alpha. Alpha determines the transparency or opacity of the color. 0 is completely transparent. 1 is completely opaque.

rgba(186, 218, 85, 0) vs rgba(186, 218, 85, 1)

Hexadecimal

The most common color format on the web is hexadecimal. Hexadecimal colors are another way to represent RGB colors.

Hexadecimal numbers are base 16 instead of base 10, so each character represents a number between 0 and 15 instead of 0 and 9.

Here's how to convert base 16 to base 10 in javascript.
  1. base16ToBase10('f0');
  2.  
  3. function base16ToBase10(base16){
  4. return parseInt(base16,16);
  5. }
Here's how to do the inverse: convert base 10 to base 16.
  1. base10ToBase16(186);
  2.  
  3. function base10ToBase16(base10){
  4. var base16 = parseFloat(base10).toString(16);
  5.  
  6. // If the hex number is 1 character long, add a 0 to the front.
  7. if (base16.length == 1){
  8. base16 = '0' + base16;
  9. }
  10.  
  11. return base16;
  12. }

A hexadecimal color is six characters long and preceded by a number sign: #BADA55. Hexadecimal colors can be split into 4 sections: # + BA + DA + 55. We can ignore the first section: #. This section tells the browser that a hexadecimal color is coming.

The remaining 3 sections contain important information about the color. Hexadecimal colors are based off of the RGB (Red, Green, Blue) color model and each section defines how much of one of those colors is present in the final color.

Red: BA Green: DA Blue: 55

Here are the color values for #BADA55, converted into base 10.

Red: 186 Green: 218 Blue: 85
Here's how to convert a hexadecimal color to RGB.
  1. hexToRgb( '#BADA55' );
  2.  
  3. function hexToRgb(color){
  4. var red = base16ToBase10( color.substring( 1, 3 ) );
  5. var green = base16ToBase10( color.substring( 3, 5 ) );
  6. var blue = base16ToBase10( color.substring( 5, 7 ) );
  7.  
  8. return 'rgb(' + red + ',' + green + ',' + blue + ')';
  9. }
Here's how to convert an RGB color to hexadecimal.
  1. rgbToHex( 'rgb(100,222,0)' );
  2.  
  3. function rgbToHex(color){
  4. var temp_color = color.replace('rgb(', '');
  5. temp_color = temp_color.replace(')', '');
  6. temp_color = temp_color.split(',');
  7.  
  8. var red = base10ToBase16(temp_color[0]);
  9. var green = base10ToBase16(temp_color[1]);
  10. var blue = base10ToBase16(temp_color[2]);
  11.  
  12. return '#' + red + green + blue;
  13. }

3 Digit Hexadecimal

Sometimes you'll see 3 digit hexadecimal colors like this: #000. This means each color pair had 2 identical digits.

f = ff so #fff = #ffffff and #3a9 = #33aa99.
Here's how to convert a 3 digit hexadecimal color to 6 digits in javascript:
  1. threeDigitsToSix('#000');
  2.  
  3. function threeDigitsToSix(color){
  4. hex = color.split('');
  5.  
  6. return '#' + hex[1] + hex[1] + hex[2] + hex[2] + hex[3] + hex[3];
  7. }

HSL (Hue, Saturation, Lightness)

HSL is a color format that attempts to match how humans view color by organizing by hue, saturation and lightness.

Hue

Hue is the most common way for people to describe colors. Hue refers to the shade of a color. Red, Green, Blue, Pink and Orange are all examples of hue.

In the hsl color model hue is plotted around a circle, so is represented as a number between 0 and 360.

Saturation

Saturation is the purity of a color, or how much grey is in the color.

A low saturation color is almost completely grey, black or white. A high saturation color is almost completely its hue. Saturation is represented as a percentage between 0 and 100.

Lightness

Lightness determines whether a color is dark or light. A 100% is white and a 0% is black.

HSLA (Hue, Saturation, Lightness, Alpha)

Similar to RGBA, HSLA has an alpha channel to determine transparency.

Converting from RGB to HSL

The first step is to convert all red, green and blue values into decimals between 0 and 1.

Then you determine the “min” and “max.” The min is the smallest decimal and the max is the largest decimal.

To discover the lightness, add the min and max values together and then divide by 2.

Once we have these values we can determine whether there is saturation and hue. If min and max are the same, then the saturation is 0. If the saturation is 0, then the hue is 0.

If min and max aren't the same, then we need to determine the saturation. Depending on the lightness there are 2 different formulas to use.

If the lightness is below 0.5 then the saturation equals (max-min)/(max+min).

If the lightness is larger than 0.5 then the saturation equals (max-min)/(2-max-min).

Now that we know the lightness and saturation, we can determine the hue. The formula to determine hue depends on which color was the "max."

If red was the max then hue equals (green-blue)/(max-min).

If green was the max then hue equals 2+(blue-red)/(max-min).

If blue was the max then hue equals 4+(red-green)/(max-min).

After making this calculation you need to convert hue to a value between and 255. Multiply the value by 42.6. If it is below 0, then add 255 to the value.

Here's how to convert an RGB color to HSL in javascript:
  1. rgbToHsl('rgb(100,50,0)');
  2.  
  3. function rgbToHsl(rgb){
  4. var channels = rgb.replace('rgb(', '');
  5. channels = channels.replace(')', '');
  6. channels = channels.split(',');
  7.  
  8. var red = channels[0] /= 255;
  9. var green = channels[1] /= 255;
  10. var blue = channels[2] /= 255;
  11.  
  12. /* Getting the Max and Min values. */
  13. var max = Math.max.apply(Math, [red,green,blue]);
  14. var min = Math.min.apply(Math, [red,green,blue]);
  15.  
  16. var lightness = (min + max)/2;
  17.  
  18. if (min === max){
  19. var saturation = 0;
  20. var hue = 0;
  21. } else{
  22. if( lightness < 0.5){
  23. var saturation = (max-min)/(max+min);
  24. } else{
  25. var saturation = (max-min)/(2-max-min);
  26. }
  27.  
  28. if (red == max) {
  29. var temp_hue = (green-blue)/(max-min);
  30. } else if (green == max) {
  31. var temp_hue = 2 + (blue-red)/(max-min);
  32. } else if (blue == max) {
  33. var temp_hue = 4 + (red-green)/(max-min);
  34. }
  35.  
  36. var hue = temp_hue * 42.6;
  37.  
  38. if (hue < 0){
  39. hue += 255;
  40. }
  41. }
  42.  
  43. saturation *= 100;
  44. lightness *= 100;
  45.  
  46. return 'hsl(' + hue + ',' + saturation + ',' + lightness + ')';
  47. }

We're Done!

The HSL color model is very close to how people interpret colors, so it is the most useful model for organization and analysis. Now that all of our colors are in HSL we can organize by hue, saturation and lightness.

Join My Mailing List

I'll only email you things I think you might find interesting. Things like this.

Subscribe to our mailing list

* indicates required