查看原文
其他

Python可视化|matplotlib05-内置单颜色(一)

pythonic生物人 pythonic生物人 2022-09-11

"pythonic生物人"的第24篇分享



摘要

这个颜色系列共有5篇文章,详细介绍matplotlib绘图颜色使用;花了较长时间整理(完全出于兴趣);本篇汇总matplotlib支持的颜色格式及内置的单颜色色号。

目录

1、matplotlib支持的颜色格式

2、matplotlib颜色使用方法

3、matplotlib内置单颜色色号

'BASE_COLORS'色号
'BASE_COLORS'色图 
TABLEAU_COLORS色号
TABLEAU_COLORS色图 
CSS4_COLORS色号
CSS4_COLORS色图
XKCD_COLORS色号
XKCD_COLORS色图

4、参考资料



正文开始啦


1、matplotlib支持的颜色格式

  • RGB 或者 RGBA 元组格式颜色
元组中浮点型数值位于 [0, 1] 之间,e.g(0.1, 0.2, 0.5) 或 (0.1, 0.2, 0.5, 0.3). RGA即Red, Green, Blue;RGBA即Red, Green, Blue, Alpha;

  • RGB or RGBA对应的hex 格式颜色
(e.g., '#0F0F0F' or '#0F0F0F0F');

  • [0,1]之间的任意浮点数
(e.g., '0.5'),其中0为纯黑色,1为白色;

  • {'b', 'g', 'r', 'c', 'm', 'y', 'k', 'w'}几种基本色;

  • X11/CSS4中的颜色

e.g. "blue";


  • xkcd中的颜色

e.g., 'purple (#7e1e9c)';


  • 'Cn'格式颜色

matplotlib.rcParams['axes.prop_cycle']可输出所有颜色,['#1f77b4', '#ff7f0e', '#2ca02c', '#d62728', '#9467bd', '#8c564b', '#e377c2', '#7f7f7f', '#bcbd22', '#17becf'],'C0'对应'#1f77b4',依次类推;


  • Tableau 的colormap中颜色

e.g. 'tab:blue';



2、matplotlib颜色使用方法

#源自官网实例import matplotlib.pyplot as pltimport numpy as np
t = np.linspace(0.0, 2.0, 201)s = np.sin(2 * np.pi * t)
# 1) RGB tuple:fig, ax = plt.subplots(facecolor=(.18, .31, .31),figsize=(10,5))# 2) hex string:ax.set_facecolor('#eafff5')# 3) gray level string:ax.set_title('Voltage vs. time chart', color='0.7')# 4) single letter color stringax.set_xlabel('time (s)', color='c')# 5) a named color:ax.set_ylabel('voltage (mV)', color='peachpuff')# 6) a named xkcd color:ax.plot(t, s, 'xkcd:crimson')# 7) Cn notation:ax.plot(t, .7*s, color='C4', linestyle='--')# 8) tab notation:ax.tick_params(labelcolor='tab:orange')plt.show()


3、matplotlib内置单颜色色号

matplotlib内置的颜色可以使用matplotlib.colors 调用,有'BASE_COLORS','TABLEAU_COLORS','CSS4_COLORS'及 'XKCD_COLORS'四类。使用matplotlib.colors.类名称可输出颜色号。

  • 'BASE_COLORS'色号

b (0, 0, 1)g (0, 0.5, 0)r (1, 0, 0)c (0, 0.75, 0.75)m (0.75, 0, 0.75)y (0.75, 0.75, 0)k (0, 0, 0)w (1, 1, 1)
  • 'BASE_COLORS'色图 

  • TABLEAU_COLORS色号

tab:blue #1f77b4tab:orange #ff7f0etab:green #2ca02ctab:red #d62728tab:purple #9467bdtab:brown #8c564btab:pink #e377c2tab:gray #7f7f7ftab:olive #bcbd22tab:cyan #17becf
  • TABLEAU_COLORS色图 

  • CSS4_COLORS色号

共计148种颜色。
颜色名称 hex色号aliceblue #F0F8FFantiquewhite #FAEBD7aqua #00FFFFaquamarine #7FFFD4azure #F0FFFFbeige #F5F5DCbisque #FFE4C4black #000000blanchedalmond #FFEBCDblue #0000FFblueviolet #8A2BE2brown #A52A2Aburlywood #DEB887cadetblue #5F9EA0chartreuse #7FFF00chocolate #D2691Ecoral #FF7F50cornflowerblue #6495EDcornsilk #FFF8DCcrimson #DC143Ccyan #00FFFFdarkblue #00008Bdarkcyan #008B8Bdarkgoldenrod #B8860Bdarkgray #A9A9A9darkgreen #006400darkgrey #A9A9A9darkkhaki #BDB76Bdarkmagenta #8B008Bdarkolivegreen #556B2Fdarkorange #FF8C00darkorchid #9932CCdarkred #8B0000darksalmon #E9967Adarkseagreen #8FBC8Fdarkslateblue #483D8Bdarkslategray #2F4F4Fdarkslategrey #2F4F4Fdarkturquoise #00CED1darkviolet #9400D3deeppink #FF1493deepskyblue #00BFFFdimgray #696969dimgrey #696969dodgerblue #1E90FFfirebrick #B22222floralwhite #FFFAF0forestgreen #228B22fuchsia #FF00FFgainsboro #DCDCDCghostwhite #F8F8FFgold #FFD700goldenrod #DAA520gray #808080green #008000greenyellow #ADFF2Fgrey #808080honeydew #F0FFF0hotpink #FF69B4indianred #CD5C5Cindigo #4B0082ivory #FFFFF0khaki #F0E68Clavender #E6E6FAlavenderblush #FFF0F5lawngreen #7CFC00lemonchiffon #FFFACDlightblue #ADD8E6lightcoral #F08080lightcyan #E0FFFFlightgoldenrodyellow #FAFAD2lightgray #D3D3D3lightgreen #90EE90lightgrey #D3D3D3lightpink #FFB6C1lightsalmon #FFA07Alightseagreen #20B2AAlightskyblue #87CEFAlightslategray #778899lightslategrey #778899lightsteelblue #B0C4DElightyellow #FFFFE0lime #00FF00limegreen #32CD32linen #FAF0E6magenta #FF00FFmaroon #800000mediumaquamarine #66CDAAmediumblue #0000CDmediumorchid #BA55D3mediumpurple #9370DBmediumseagreen #3CB371mediumslateblue #7B68EEmediumspringgreen #00FA9Amediumturquoise #48D1CCmediumvioletred #C71585midnightblue #191970mintcream #F5FFFAmistyrose #FFE4E1moccasin #FFE4B5navajowhite #FFDEADnavy #000080oldlace #FDF5E6olive #808000olivedrab #6B8E23orange #FFA500orangered #FF4500orchid #DA70D6palegoldenrod #EEE8AApalegreen #98FB98paleturquoise #AFEEEEpalevioletred #DB7093papayawhip #FFEFD5peachpuff #FFDAB9peru #CD853Fpink #FFC0CBplum #DDA0DDpowderblue #B0E0E6purple #800080rebeccapurple #663399red #FF0000rosybrown #BC8F8Froyalblue #4169E1saddlebrown #8B4513salmon #FA8072sandybrown #F4A460seagreen #2E8B57seashell #FFF5EEsienna #A0522Dsilver #C0C0C0skyblue #87CEEBslateblue #6A5ACDslategray #708090slategrey #708090snow #FFFAFAspringgreen #00FF7Fsteelblue #4682B4tan #D2B48Cteal #008080thistle #D8BFD8tomato #FF6347turquoise #40E0D0violet #EE82EEwheat #F5DEB3white #FFFFFFwhitesmoke #F5F5F5yellow #FFFF00yellowgreen #9ACD32
  • CSS4_COLORS色图

  • XKCD_COLORS色号

共计949种色号。
xkcd:cloudy blue #acc2d9xkcd:dark pastel green #56ae57xkcd:dust #b2996exkcd:electric lime #a8ff04xkcd:fresh green #69d84fxkcd:light eggplant #894585xkcd:nasty green #70b23fxkcd:really light blue #d4ffffxkcd:tea #65ab7cxkcd:warm purple #952e8fxkcd:yellowish tan #fcfc81xkcd:cement #a5a391xkcd:dark grass green #388004xkcd:dusty teal #4c9085xkcd:grey teal #5e9b8axkcd:macaroni and cheese #efb435xkcd:pinkish tan #d99b82xkcd:spruce #0a5f38xkcd:strong blue #0c06f7xkcd:toxic green #61de2axkcd:windows blue #3778bfxkcd:blue blue #2242c7xkcd:blue with a hint of purple #533cc6xkcd:booger #9bb53cxkcd:bright sea green #05ffa6xkcd:dark green blue #1f6357xkcd:deep turquoise #017374xkcd:green teal #0cb577xkcd:strong pink #ff0789xkcd:bland #afa88bxkcd:deep aqua #08787fxkcd:lavender pink #dd85d7xkcd:light moss green #a6c875xkcd:light seafoam green #a7ffb5xkcd:olive yellow #c2b709xkcd:pig pink #e78ea5xkcd:deep lilac #966ebdxkcd:desert #ccad60xkcd:dusty lavender #ac86a8xkcd:purpley grey #947e94xkcd:purply #983fb2xkcd:candy pink #ff63e9xkcd:light pastel green #b2fba5xkcd:boring green #63b365xkcd:kiwi green #8ee53fxkcd:light grey green #b7e1a1xkcd:orange pink #ff6f52xkcd:tea green #bdf8a3xkcd:very light brown #d3b683xkcd:egg shell #fffcc4xkcd:eggplant purple #430541xkcd:powder pink #ffb2d0xkcd:reddish grey #997570xkcd:baby shit brown #ad900dxkcd:liliac #c48efdxkcd:stormy blue #507b9cxkcd:ugly brown #7d7103xkcd:custard #fffd78xkcd:darkish pink #da467dxkcd:deep brown #410200xkcd:greenish beige #c9d179xkcd:manilla #fffa86xkcd:off blue #5684aexkcd:battleship grey #6b7c85xkcd:browny green #6f6c0axkcd:bruise #7e4071xkcd:kelley green #009337xkcd:sickly yellow #d0e429xkcd:sunny yellow #fff917xkcd:azul #1d5decxkcd:darkgreen #054907xkcd:green/yellow #b5ce08xkcd:lichen #8fb67bxkcd:light light green #c8ffb0xkcd:pale gold #fdde6cxkcd:sun yellow #ffdf22xkcd:tan green #a9be70xkcd:burple #6832e3xkcd:butterscotch #fdb147xkcd:toupe #c7ac7dxkcd:dark cream #fff39axkcd:indian red #850e04xkcd:light lavendar #efc0fexkcd:poison green #40fd14xkcd:baby puke green #b6c406xkcd:bright yellow green #9dff00xkcd:charcoal grey #3c4142xkcd:squash #f2ab15xkcd:cinnamon #ac4f06xkcd:light pea green #c4fe82xkcd:radioactive green #2cfa1fxkcd:raw sienna #9a6200xkcd:baby purple #ca9bf7xkcd:cocoa #875f42xkcd:light royal blue #3a2efexkcd:orangeish #fd8d49xkcd:rust brown #8b3103xkcd:sand brown #cba560xkcd:swamp #698339xkcd:tealish green #0cdc73xkcd:burnt siena #b75203xkcd:camo #7f8f4exkcd:dusk blue #26538dxkcd:fern #63a950xkcd:old rose #c87f89xkcd:pale light green #b1fc99xkcd:peachy pink #ff9a8axkcd:rosy pink #f6688exkcd:light bluish green #76fda8xkcd:light bright green #53fe5cxkcd:light neon green #4efd54xkcd:light seafoam #a0febfxkcd:tiffany blue #7bf2daxkcd:washed out green #bcf5a6xkcd:browny orange #ca6b02xkcd:nice blue #107ab0xkcd:sapphire #2138abxkcd:greyish teal #719f91xkcd:orangey yellow #fdb915xkcd:parchment #fefcafxkcd:straw #fcf679xkcd:very dark brown #1d0200xkcd:terracota #cb6843xkcd:ugly blue #31668axkcd:clear blue #247afdxkcd:creme #ffffb6xkcd:foam green #90fda9xkcd:grey/green #86a17dxkcd:light gold #fddc5cxkcd:seafoam blue #78d1b6xkcd:topaz #13bbafxkcd:violet pink #fb5ffcxkcd:wintergreen #20f986xkcd:yellow tan #ffe36exkcd:dark fuchsia #9d0759xkcd:indigo blue #3a18b1xkcd:light yellowish green #c2ff89xkcd:pale magenta #d767adxkcd:rich purple #720058xkcd:sunflower yellow #ffda03xkcd:green/blue #01c08dxkcd:leather #ac7434xkcd:racing green #014600xkcd:vivid purple #9900faxkcd:dark royal blue #02066fxkcd:hazel #8e7618xkcd:muted pink #d1768fxkcd:booger green #96b403xkcd:canary #fdff63xkcd:cool grey #95a3a6xkcd:dark taupe #7f684exkcd:darkish purple #751973xkcd:true green #089404xkcd:coral pink #ff6163xkcd:dark sage #598556xkcd:dark slate blue #214761xkcd:flat blue #3c73a8xkcd:mushroom #ba9e88xkcd:rich blue #021bf9xkcd:dirty purple #734a65xkcd:greenblue #23c48bxkcd:icky green #8fae22xkcd:light khaki #e6f2a2xkcd:warm blue #4b57dbxkcd:dark hot pink #d90166xkcd:deep sea blue #015482xkcd:carmine #9d0216xkcd:dark yellow green #728f02xkcd:pale peach #ffe5adxkcd:plum purple #4e0550xkcd:golden rod #f9bc08xkcd:neon red #ff073axkcd:old pink #c77986xkcd:very pale blue #d6fffexkcd:blood orange #fe4b03xkcd:grapefruit #fd5956xkcd:sand yellow #fce166xkcd:clay brown #b2713dxkcd:dark blue grey #1f3b4dxkcd:flat green #699d4cxkcd:light green blue #56fca2xkcd:warm pink #fb5581xkcd:dodger blue #3e82fcxkcd:gross green #a0bf16xkcd:ice #d6fffaxkcd:metallic blue #4f738exkcd:pale salmon #ffb19axkcd:sap green #5c8b15xkcd:algae #54ac68xkcd:bluey grey #89a0b0xkcd:greeny grey #7ea07axkcd:highlighter green #1bfc06xkcd:light light blue #cafffbxkcd:light mint #b6ffbbxkcd:raw umber #a75e09xkcd:vivid blue #152effxkcd:deep lavender #8d5eb7xkcd:dull teal #5f9e8fxkcd:light greenish blue #63f7b4xkcd:mud green #606602xkcd:pinky #fc86aaxkcd:red wine #8c0034xkcd:shit green #758000xkcd:tan brown #ab7e4cxkcd:darkblue #030764xkcd:rosa #fe86a4xkcd:lipstick #d5174exkcd:pale mauve #fed0fcxkcd:claret #680018xkcd:dandelion #fedf08xkcd:orangered #fe420fxkcd:poop green #6f7c00xkcd:ruby #ca0147xkcd:dark #1b2431xkcd:greenish turquoise #00fbb0xkcd:pastel red #db5856xkcd:piss yellow #ddd618xkcd:bright cyan #41fdfexkcd:dark coral #cf524exkcd:algae green #21c36fxkcd:darkish red #a90308xkcd:reddy brown #6e1005xkcd:blush pink #fe828cxkcd:camouflage green #4b6113xkcd:lawn green #4da409xkcd:putty #beae8axkcd:vibrant blue #0339f8xkcd:dark sand #a88f59xkcd:purple/blue #5d21d0xkcd:saffron #feb209xkcd:twilight #4e518bxkcd:warm brown #964e02xkcd:bluegrey #85a3b2xkcd:bubble gum pink #ff69afxkcd:duck egg blue #c3fbf4xkcd:greenish cyan #2afeb7xkcd:petrol #005f6axkcd:royal #0c1793xkcd:butter #ffff81xkcd:dusty orange #f0833axkcd:off yellow #f1f33fxkcd:pale olive green #b1d27bxkcd:orangish #fc824axkcd:leaf #71aa34xkcd:light blue grey #b7c9e2xkcd:dried blood #4b0101xkcd:lightish purple #a552e6xkcd:rusty red #af2f0dxkcd:lavender blue #8b88f8xkcd:light grass green #9af764xkcd:light mint green #a6fbb2xkcd:sunflower #ffc512xkcd:velvet #750851xkcd:brick orange #c14a09xkcd:lightish red #fe2f4axkcd:pure blue #0203e2xkcd:twilight blue #0a437axkcd:violet red #a50055xkcd:yellowy brown #ae8b0cxkcd:carnation #fd798fxkcd:muddy yellow #bfac05xkcd:dark seafoam green #3eaf76xkcd:deep rose #c74767xkcd:dusty red #b9484exkcd:grey/blue #647d8exkcd:lemon lime #bffe28xkcd:purple/pink #d725dexkcd:brown yellow #b29705xkcd:purple brown #673a3fxkcd:wisteria #a87dc2xkcd:banana yellow #fafe4bxkcd:lipstick red #c0022fxkcd:water blue #0e87ccxkcd:brown grey #8d8468xkcd:vibrant purple #ad03dexkcd:baby green #8cff9exkcd:barf green #94ac02xkcd:eggshell blue #c4fff7xkcd:sandy yellow #fdee73xkcd:cool green #33b864xkcd:pale #fff9d0xkcd:blue/grey #758da3xkcd:hot magenta #f504c9xkcd:greyblue #77a1b5xkcd:purpley #8756e4xkcd:baby shit green #889717xkcd:brownish pink #c27e79xkcd:dark aquamarine #017371xkcd:diarrhea #9f8303xkcd:light mustard #f7d560xkcd:pale sky blue #bdf6fexkcd:turtle green #75b84fxkcd:bright olive #9cbb04xkcd:dark grey blue #29465bxkcd:greeny brown #696006xkcd:lemon green #adf802xkcd:light periwinkle #c1c6fcxkcd:seaweed green #35ad6bxkcd:sunshine yellow #fffd37xkcd:ugly purple #a442a0xkcd:medium pink #f36196xkcd:puke brown #947706xkcd:very light pink #fff4f2xkcd:viridian #1e9167xkcd:bile #b5c306xkcd:faded yellow #feff7fxkcd:very pale green #cffdbcxkcd:vibrant green #0add08xkcd:bright lime #87fd05xkcd:spearmint #1ef876xkcd:light aquamarine #7bfdc7xkcd:light sage #bcecacxkcd:yellowgreen #bbf90fxkcd:baby poo #ab9004xkcd:dark seafoam #1fb57axkcd:deep teal #00555axkcd:heather #a484acxkcd:rust orange #c45508xkcd:dirty blue #3f829dxkcd:fern green #548d44xkcd:bright lilac #c95efbxkcd:weird green #3ae57fxkcd:peacock blue #016795xkcd:avocado green #87a922xkcd:faded orange #f0944dxkcd:grape purple #5d1451xkcd:hot green #25ff29xkcd:lime yellow #d0fe1dxkcd:mango #ffa62bxkcd:shamrock #01b44cxkcd:bubblegum #ff6cb5xkcd:purplish brown #6b4247xkcd:vomit yellow #c7c10cxkcd:pale cyan #b7fffaxkcd:key lime #aeff6exkcd:tomato red #ec2d01xkcd:lightgreen #76ff7bxkcd:merlot #730039xkcd:night blue #040348xkcd:purpleish pink #df4ec8xkcd:apple #6ecb3cxkcd:baby poop green #8f9805xkcd:green apple #5edc1fxkcd:heliotrope #d94ff5xkcd:yellow/green #c8fd3dxkcd:almost black #070d0dxkcd:cool blue #4984b8xkcd:leafy green #51b73bxkcd:mustard brown #ac7e04xkcd:dusk #4e5481xkcd:dull brown #876e4bxkcd:frog green #58bc08xkcd:vivid green #2fef10xkcd:bright light green #2dfe54xkcd:fluro green #0aff02xkcd:kiwi #9cef43xkcd:seaweed #18d17bxkcd:navy green #35530axkcd:ultramarine blue #1805dbxkcd:iris #6258c4xkcd:pastel orange #ff964fxkcd:yellowish orange #ffab0fxkcd:perrywinkle #8f8ce7xkcd:tealish #24bca8xkcd:dark plum #3f012cxkcd:pear #cbf85fxkcd:pinkish orange #ff724cxkcd:midnight purple #280137xkcd:light urple #b36ff6xkcd:dark mint #48c072xkcd:greenish tan #bccb7axkcd:light burgundy #a8415bxkcd:turquoise blue #06b1c4xkcd:ugly pink #cd7584xkcd:sandy #f1da7axkcd:electric pink #ff0490xkcd:muted purple #805b87xkcd:mid green #50a747xkcd:greyish #a8a495xkcd:neon yellow #cfff04xkcd:banana #ffff7exkcd:carnation pink #ff7fa7xkcd:tomato #ef4026xkcd:sea #3c9992xkcd:muddy brown #886806xkcd:turquoise green #04f489xkcd:buff #fef69exkcd:fawn #cfaf7bxkcd:muted blue #3b719fxkcd:pale rose #fdc1c5xkcd:dark mint green #20c073xkcd:amethyst #9b5fc0xkcd:blue/green #0f9b8exkcd:chestnut #742802xkcd:sick green #9db92cxkcd:pea #a4bf20xkcd:rusty orange #cd5909xkcd:stone #ada587xkcd:rose red #be013cxkcd:pale aqua #b8ffebxkcd:deep orange #dc4d01xkcd:earth #a2653exkcd:mossy green #638b27xkcd:grassy green #419c03xkcd:pale lime green #b1ff65xkcd:light grey blue #9dbcd4xkcd:pale grey #fdfdfexkcd:asparagus #77ab56xkcd:blueberry #464196xkcd:purple red #990147xkcd:pale lime #befd73xkcd:greenish teal #32bf84xkcd:caramel #af6f09xkcd:deep magenta #a0025cxkcd:light peach #ffd8b1xkcd:milk chocolate #7f4e1exkcd:ocher #bf9b0cxkcd:off green #6ba353xkcd:purply pink #f075e6xkcd:lightblue #7bc8f6xkcd:dusky blue #475f94xkcd:golden #f5bf03xkcd:light beige #fffeb6xkcd:butter yellow #fffd74xkcd:dusky purple #895b7bxkcd:french blue #436badxkcd:ugly yellow #d0c101xkcd:greeny yellow #c6f808xkcd:orangish red #f43605xkcd:shamrock green #02c14dxkcd:orangish brown #b25f03xkcd:tree green #2a7e19xkcd:deep violet #490648xkcd:gunmetal #536267xkcd:blue/purple #5a06efxkcd:cherry #cf0234xkcd:sandy brown #c4a661xkcd:warm grey #978a84xkcd:dark indigo #1f0954xkcd:midnight #03012dxkcd:bluey green #2bb179xkcd:grey pink #c3909bxkcd:soft purple #a66fb5xkcd:blood #770001xkcd:brown red #922b05xkcd:medium grey #7d7f7cxkcd:berry #990f4bxkcd:poo #8f7303xkcd:purpley pink #c83cb9xkcd:light salmon #fea993xkcd:snot #acbb0dxkcd:easter purple #c071fexkcd:light yellow green #ccfd7fxkcd:dark navy blue #00022exkcd:drab #828344xkcd:light rose #ffc5cbxkcd:rouge #ab1239xkcd:purplish red #b0054bxkcd:slime green #99cc04xkcd:baby poop #937c00xkcd:irish green #019529xkcd:pink/purple #ef1de7xkcd:dark navy #000435xkcd:greeny blue #42b395xkcd:light plum #9d5783xkcd:pinkish grey #c8aca9xkcd:dirty orange #c87606xkcd:rust red #aa2704xkcd:pale lilac #e4cbffxkcd:orangey red #fa4224xkcd:primary blue #0804f9xkcd:kermit green #5cb200xkcd:brownish purple #76424exkcd:murky green #6c7a0exkcd:wheat #fbdd7exkcd:very dark purple #2a0134xkcd:bottle green #044a05xkcd:watermelon #fd4659xkcd:deep sky blue #0d75f8xkcd:fire engine red #fe0002xkcd:yellow ochre #cb9d06xkcd:pumpkin orange #fb7d07xkcd:pale olive #b9cc81xkcd:light lilac #edc8ffxkcd:lightish green #61e160xkcd:carolina blue #8ab8fexkcd:mulberry #920a4exkcd:shocking pink #fe02a2xkcd:auburn #9a3001xkcd:bright lime green #65fe08xkcd:celadon #befdb7xkcd:pinkish brown #b17261xkcd:poo brown #885f01xkcd:bright sky blue #02ccfexkcd:celery #c1fd95xkcd:dirt brown #836539xkcd:strawberry #fb2943xkcd:dark lime #84b701xkcd:copper #b66325xkcd:medium brown #7f5112xkcd:muted green #5fa052xkcd:robin's egg #6dedfdxkcd:bright aqua #0bf9eaxkcd:bright lavender #c760ffxkcd:ivory #ffffcbxkcd:very light purple #f6cefcxkcd:light navy #155084xkcd:pink red #f5054fxkcd:olive brown #645403xkcd:poop brown #7a5901xkcd:mustard green #a8b504xkcd:ocean green #3d9973xkcd:very dark blue #000133xkcd:dusty green #76a973xkcd:light navy blue #2e5a88xkcd:minty green #0bf77dxkcd:adobe #bd6c48xkcd:barney #ac1db8xkcd:jade green #2baf6axkcd:bright light blue #26f7fdxkcd:light lime #aefd6cxkcd:dark khaki #9b8f55xkcd:orange yellow #ffad01xkcd:ocre #c69c04xkcd:maize #f4d054xkcd:faded pink #de9dacxkcd:british racing green #05480dxkcd:sandstone #c9ae74xkcd:mud brown #60460fxkcd:light sea green #98f6b0xkcd:robin egg blue #8af1fexkcd:aqua marine #2ee8bbxkcd:dark sea green #11875dxkcd:soft pink #fdb0c0xkcd:orangey brown #b16002xkcd:cherry red #f7022axkcd:burnt yellow #d5ab09xkcd:brownish grey #86775fxkcd:camel #c69f59xkcd:purplish grey #7a687fxkcd:marine #042e60xkcd:greyish pink #c88d94xkcd:pale turquoise #a5fbd5xkcd:pastel yellow #fffe71xkcd:bluey purple #6241c7xkcd:canary yellow #fffe40xkcd:faded red #d3494exkcd:sepia #985e2bxkcd:coffee #a6814cxkcd:bright magenta #ff08e8xkcd:mocha #9d7651xkcd:ecru #feffcaxkcd:purpleish #98568dxkcd:cranberry #9e003axkcd:darkish green #287c37xkcd:brown orange #b96902xkcd:dusky rose #ba6873xkcd:melon #ff7855xkcd:sickly green #94b21cxkcd:silver #c5c9c7xkcd:purply blue #661aeexkcd:purpleish blue #6140efxkcd:hospital green #9be5aaxkcd:shit brown #7b5804xkcd:mid blue #276ab3xkcd:amber #feb308xkcd:easter green #8cfd7exkcd:soft blue #6488eaxkcd:cerulean blue #056eeexkcd:golden brown #b27a01xkcd:bright turquoise #0ffef9xkcd:red pink #fa2a55xkcd:red purple #820747xkcd:greyish brown #7a6a4fxkcd:vermillion #f4320cxkcd:russet #a13905xkcd:steel grey #6f828axkcd:lighter purple #a55af4xkcd:bright violet #ad0afdxkcd:prussian blue #004577xkcd:slate green #658d6dxkcd:dirty pink #ca7b80xkcd:dark blue green #005249xkcd:pine #2b5d34xkcd:yellowy green #bff128xkcd:dark gold #b59410xkcd:bluish #2976bbxkcd:darkish blue #014182xkcd:dull red #bb3f3fxkcd:pinky red #fc2647xkcd:bronze #a87900xkcd:pale teal #82cbb2xkcd:military green #667c3exkcd:barbie pink #fe46a5xkcd:bubblegum pink #fe83ccxkcd:pea soup green #94a617xkcd:dark mustard #a88905xkcd:shit #7f5f00xkcd:medium purple #9e43a2xkcd:very dark green #062e03xkcd:dirt #8a6e45xkcd:dusky pink #cc7a8bxkcd:red violet #9e0168xkcd:lemon yellow #fdff38xkcd:pistachio #c0fa8bxkcd:dull yellow #eedc5bxkcd:dark lime green #7ebd01xkcd:denim blue #3b5b92xkcd:teal blue #01889fxkcd:lightish blue #3d7afdxkcd:purpley blue #5f34e7xkcd:light indigo #6d5acfxkcd:swamp green #748500xkcd:brown green #706c11xkcd:dark maroon #3c0008xkcd:hot purple #cb00f5xkcd:dark forest green #002d04xkcd:faded blue #658cbbxkcd:drab green #749551xkcd:light lime green #b9ff66xkcd:snot green #9dc100xkcd:yellowish #faee66xkcd:light blue green #7efbb3xkcd:bordeaux #7b002cxkcd:light mauve #c292a1xkcd:ocean #017b92xkcd:marigold #fcc006xkcd:muddy green #657432xkcd:dull orange #d8863bxkcd:steel #738595xkcd:electric purple #aa23ffxkcd:fluorescent green #08ff08xkcd:yellowish brown #9b7a01xkcd:blush #f29e8exkcd:soft green #6fc276xkcd:bright orange #ff5b00xkcd:lemon #fdff52xkcd:purple grey #866f85xkcd:acid green #8ffe09xkcd:pale lavender #eecffexkcd:violet blue #510ac9xkcd:light forest green #4f9153xkcd:burnt red #9f2305xkcd:khaki green #728639xkcd:cerise #de0c62xkcd:faded purple #916e99xkcd:apricot #ffb16dxkcd:dark olive green #3c4d03xkcd:grey brown #7f7053xkcd:green grey #77926fxkcd:true blue #010fccxkcd:pale violet #ceaefaxkcd:periwinkle blue #8f99fbxkcd:light sky blue #c6fcffxkcd:blurple #5539ccxkcd:green brown #544e03xkcd:bluegreen #017a79xkcd:bright teal #01f9c6xkcd:brownish yellow #c9b003xkcd:pea soup #929901xkcd:forest #0b5509xkcd:barney purple #a00498xkcd:ultramarine #2000b1xkcd:purplish #94568cxkcd:puke yellow #c2be0exkcd:bluish grey #748b97xkcd:dark periwinkle #665fd1xkcd:dark lilac #9c6da5xkcd:reddish #c44240xkcd:light maroon #a24857xkcd:dusty purple #825f87xkcd:terra cotta #c9643bxkcd:avocado #90b134xkcd:marine blue #01386axkcd:teal green #25a36fxkcd:slate grey #59656dxkcd:lighter green #75fd63xkcd:electric green #21fc0dxkcd:dusty blue #5a86adxkcd:golden yellow #fec615xkcd:bright yellow #fffd01xkcd:light lavender #dfc5fexkcd:umber #b26400xkcd:poop #7f5e00xkcd:dark peach #de7e5dxkcd:jungle green #048243xkcd:eggshell #ffffd4xkcd:denim #3b638cxkcd:yellow brown #b79400xkcd:dull purple #84597exkcd:chocolate brown #411900xkcd:wine red #7b0323xkcd:neon blue #04d9ffxkcd:dirty green #667e2cxkcd:light tan #fbeeacxkcd:ice blue #d7fffexkcd:cadet blue #4e7496xkcd:dark mauve #874c62xkcd:very light blue #d5ffffxkcd:grey purple #826d8cxkcd:pastel pink #ffbacdxkcd:very light green #d1ffbdxkcd:dark sky blue #448ee4xkcd:evergreen #05472axkcd:dull pink #d5869dxkcd:aubergine #3d0734xkcd:mahogany #4a0100xkcd:reddish orange #f8481cxkcd:deep green #02590fxkcd:vomit green #89a203xkcd:purple pink #e03fd8xkcd:dusty pink #d58a94xkcd:faded green #7bb274xkcd:camo green #526525xkcd:pinky purple #c94cbexkcd:pink purple #db4bdaxkcd:brownish red #9e3623xkcd:dark rose #b5485dxkcd:mud #735c12xkcd:brownish #9c6d57xkcd:emerald green #028f1exkcd:pale brown #b1916exkcd:dull blue #49759cxkcd:burnt umber #a0450exkcd:medium green #39ad48xkcd:clay #b66a50xkcd:light aqua #8cffdbxkcd:light olive green #a4be5cxkcd:brownish orange #cb7723xkcd:dark aqua #05696bxkcd:purplish pink #ce5daexkcd:dark salmon #c85a53xkcd:greenish grey #96ae8dxkcd:jade #1fa774xkcd:ugly green #7a9703xkcd:dark beige #ac9362xkcd:emerald #01a049xkcd:pale red #d9544dxkcd:light magenta #fa5ff7xkcd:sky #82cafcxkcd:light cyan #acfffcxkcd:yellow orange #fcb001xkcd:reddish purple #910951xkcd:reddish pink #fe2c54xkcd:orchid #c875c4xkcd:dirty yellow #cdc50axkcd:orange red #fd411exkcd:deep red #9a0200xkcd:orange brown #be6400xkcd:cobalt blue #030aa7xkcd:neon pink #fe019axkcd:rose pink #f7879axkcd:greyish purple #887191xkcd:raspberry #b00149xkcd:aqua green #12e193xkcd:salmon pink #fe7b7cxkcd:tangerine #ff9408xkcd:brownish green #6a6e09xkcd:red brown #8b2e16xkcd:greenish brown #696112xkcd:pumpkin #e17701xkcd:pine green #0a481exkcd:charcoal #343837xkcd:baby pink #ffb7cexkcd:cornflower #6a79f7xkcd:blue violet #5d06e9xkcd:chocolate #3d1c02xkcd:greyish green #82a67dxkcd:scarlet #be0119xkcd:green yellow #c9ff27xkcd:dark olive #373e02xkcd:sienna #a9561exkcd:pastel purple #caa0ffxkcd:terracotta #ca6641xkcd:aqua blue #02d8e9xkcd:sage green #88b378xkcd:blood red #980002xkcd:deep pink #cb0162xkcd:grass #5cac2dxkcd:moss #769958xkcd:pastel blue #a2bffexkcd:bluish green #10a674xkcd:green blue #06b48bxkcd:dark tan #af884axkcd:greenish blue #0b8b87xkcd:pale orange #ffa756xkcd:vomit #a2a415xkcd:forrest green #154406xkcd:dark lavender #856798xkcd:dark violet #34013fxkcd:purple blue #632de9xkcd:dark cyan #0a888axkcd:olive drab #6f7632xkcd:pinkish #d46a7exkcd:cobalt #1e488fxkcd:neon purple #bc13fexkcd:light turquoise #7ef4ccxkcd:apple green #76cd26xkcd:dull green #74a662xkcd:wine #80013fxkcd:powder blue #b1d1fcxkcd:off white #ffffe4xkcd:electric blue #0652ffxkcd:dark turquoise #045c5axkcd:blue purple #5729cexkcd:azure #069af3xkcd:bright red #ff000dxkcd:pinkish red #f10c45xkcd:cornflower blue #5170d7xkcd:light olive #acbf69xkcd:grape #6c3461xkcd:greyish blue #5e819dxkcd:purplish blue #601ef9xkcd:yellowish green #b0dd16xkcd:greenish yellow #cdfd02xkcd:medium blue #2c6fbbxkcd:dusty rose #c0737axkcd:light violet #d6b4fcxkcd:midnight blue #020035xkcd:bluish purple #703be7xkcd:red orange #fd3c06xkcd:dark magenta #960056xkcd:greenish #40a368xkcd:ocean blue #03719cxkcd:coral #fc5a50xkcd:cream #ffffc2xkcd:reddish brown #7f2b0axkcd:burnt sienna #b04e0fxkcd:brick #a03623xkcd:sage #87ae73xkcd:grey green #789b73xkcd:white #ffffffxkcd:robin's egg blue #98eff9xkcd:moss green #658b38xkcd:steel blue #5a7d9axkcd:eggplant #380835xkcd:light yellow #fffe7axkcd:leaf green #5ca904xkcd:light grey #d8dcd6xkcd:puke #a5a502xkcd:pinkish purple #d648d7xkcd:sea blue #047495xkcd:pale purple #b790d4xkcd:slate blue #5b7c99xkcd:blue grey #607c8exkcd:hunter green #0b4008xkcd:fuchsia #ed0dd9xkcd:crimson #8c000fxkcd:pale yellow #ffff84xkcd:ochre #bf9005xkcd:mustard yellow #d2bd0axkcd:light red #ff474cxkcd:cerulean #0485d1xkcd:pale pink #ffcfdcxkcd:deep blue #040273xkcd:rust #a83c09xkcd:light teal #90e4c1xkcd:slate #516572xkcd:goldenrod #fac205xkcd:dark yellow #d5b60axkcd:dark grey #363737xkcd:army green #4b5d16xkcd:grey blue #6b8ba4xkcd:seafoam #80f9adxkcd:puce #a57e52xkcd:spring green #a9f971xkcd:dark orange #c65102xkcd:sand #e2ca76xkcd:pastel green #b0ff9dxkcd:mint #9ffeb0xkcd:light orange #fdaa48xkcd:bright pink #fe01b1xkcd:chartreuse #c1f80axkcd:deep purple #36013fxkcd:dark brown #341c02xkcd:taupe #b9a281xkcd:pea green #8eab12xkcd:puke green #9aae07xkcd:kelly green #02ab2exkcd:seafoam green #7af9abxkcd:blue green #137e6dxkcd:khaki #aaa662xkcd:burgundy #610023xkcd:dark teal #014d4exkcd:brick red #8f1402xkcd:royal purple #4b006exkcd:plum #580f41xkcd:mint green #8fff9fxkcd:gold #dbb40cxkcd:baby blue #a2cffexkcd:yellow green #c0fb2dxkcd:bright purple #be03fdxkcd:dark red #840000xkcd:pale blue #d0fefexkcd:grass green #3f9b0bxkcd:navy #01153exkcd:aquamarine #04d8b2xkcd:burnt orange #c04e01xkcd:neon green #0cff0cxkcd:bright blue #0165fcxkcd:rose  #cf6275 xkcd:light pink #ffd1dfxkcd:mustard #ceb301xkcd:indigo #380282xkcd:lime #aaff32xkcd:sea green #53fca1xkcd:periwinkle #8e82fexkcd:dark pink #cb416bxkcd:olive green #677a04xkcd:peach #ffb07cxkcd:pale green #c7fdb5xkcd:light brown #ad8150xkcd:hot pink #ff028dxkcd:black #000000xkcd:lilac #cea2fdxkcd:navy blue #001146xkcd:royal blue #0504aaxkcd:beige #e6daa6xkcd:salmon #ff796cxkcd:olive #6e750exkcd:maroon #650021xkcd:bright green #01ff07xkcd:dark purple #35063exkcd:mauve #ae7181xkcd:forest green #06470cxkcd:aqua #13eac9xkcd:cyan #00ffffxkcd:tan #d1b26fxkcd:dark blue #00035bxkcd:lavender #c79fefxkcd:turquoise #06c2acxkcd:dark green #033500xkcd:violet #9a0eeaxkcd:light purple #bf77f6xkcd:lime green #89fe05xkcd:grey #929591xkcd:sky blue #75bbfdxkcd:yellow #ffff14xkcd:magenta #c20078xkcd:light green #96f97bxkcd:orange #f97306xkcd:teal #029386xkcd:light blue #95d0fcxkcd:red #e50000xkcd:brown #653700xkcd:pink #ff81c0xkcd:blue #0343dfxkcd:green #15b01axkcd:purple #7e1e9c
  • XKCD_COLORS色图

4、参考资料

https://matplotlib.org/gallery/color/color_demo.html#sphx-glr-gallery-color-color-demo-pwo'd

同系列文章


python可视化|matplotlib01-绘图方式|图形结构

python可视化|matplotlib02-matplotlib.pyplot坐标轴|刻度值|刻度|标题设置

Python可视化|matplotlib03-一文掌握marker和linestyle使用

Python可视化|matplotlib04-绘图风格(plt.style)大全


持续更新,欢迎您"关注"、"在看"、"分享"


您可能也对以下帖子感兴趣

文章有问题?点此查看未经处理的缓存