.. _matplotlib-color:

:orphan:

..  role:: raw-html(raw)
    :format: html

Colors of matplotib
===================
    The color abbreviations are single-letter codes.
    :raw-html:`<TABLE border="1" frame="hsides" rules="groups" align="center">
    <CAPTION>Base Colors</CAPTION>
    <COLGROUP>
    <COLGROUP span="2">
    <TR><TH>Character<TH>&#160;Hex<TH>&#160;Color
    <TBODY>
    <TR><TD style="text-align:center">"b"<TD>&#160;<CODE>#0343df</CODE><TD>&#160;<FONT color="#0343df"><B>blue</B></FONT>
    <TR><TD style="text-align:center">"g"<TD>&#160;<CODE>#15b01a</CODE><TD>&#160;<FONT color="#15b01a"><B>green</B></FONT>
    <TR><TD style="text-align:center">"r"<TD>&#160;<CODE>#e50000</CODE><TD>&#160;<FONT color="#e50000"><B>red</B></FONT>
    <TR><TD style="text-align:center">"c"<TD>&#160;<CODE>#00ffff</CODE><TD>&#160;<FONT color="#00ffff"><B>cyan</B></FONT>
    <TR><TD style="text-align:center">"m"<TD>&#160;<CODE>#c20078</CODE><TD>&#160;<FONT color="#c20078"><B>magenta</B></FONT>
    <TR><TD style="text-align:center">"y"<TD>&#160;<CODE>#ffff14</CODE><TD>&#160;<FONT color="#ffff14"><B>yellow</B></FONT>
    <TR><TD style="text-align:center">"k"<TD>&#160;<CODE>#000000</CODE><TD>&#160;<FONT color="#000000"><B>black</B></FONT>
    <TR><TD style="text-align:center">"w"<TD>&#160;<CODE>#ffffff</CODE><TD>&#160;(white)
    </TABLE>`

    The color codes of the default-property cycle are the character ``"C"`` followed by one digit.
    :raw-html:`<TABLE border="1" frame="hsides" rules="groups" align="center">
    <CAPTION>Default-Property Colors</CAPTION>
    <COLGROUP>
    <COLGROUP span="2">
    <TR><TH>String<TH>&#160;Hex<TH>&#160;Color
    <TBODY>
    <TR><TD style="text-align:center">"C0"<TD>&#160;<CODE>#1f77b4</CODE><TD>&#160;<FONT color="#1f77b4"><B>blue</B></FONT>
    <TR><TD style="text-align:center">"C1"<TD>&#160;<CODE>#ff7f0e</CODE><TD>&#160;<FONT color="#ff7f0e"><B>orange</B></FONT>
    <TR><TD style="text-align:center">"C2"<TD>&#160;<CODE>#2ca02c</CODE><TD>&#160;<FONT color="#2ca02c"><B>green</B></FONT>
    <TR><TD style="text-align:center">"C3"<TD>&#160;<CODE>#d62728</CODE><TD>&#160;<FONT color="#d62728"><B>red</B></FONT>
    <TR><TD style="text-align:center">"C4"<TD>&#160;<CODE>#9467bd</CODE><TD>&#160;<FONT color="#9467bd"><B>purple</B></FONT>
    <TR><TD style="text-align:center">"C5"<TD>&#160;<CODE>#8c564b</CODE><TD>&#160;<FONT color="#8c564b"><B>brown</B></FONT>
    <TR><TD style="text-align:center">"C6"<TD>&#160;<CODE>#e377c2</CODE><TD>&#160;<FONT color="#e377c2"><B>pink</B></FONT>
    <TR><TD style="text-align:center">"C7"<TD>&#160;<CODE>#7f7f7f</CODE><TD>&#160;<FONT color="#7f7f7f"><B>gray</B></FONT>
    <TR><TD style="text-align:center">"C8"<TD>&#160;<CODE>#bcbd22</CODE><TD>&#160;<FONT color="#bcbd22"><B>olive</B></FONT>
    <TR><TD style="text-align:center">"C9"<TD>&#160;<CODE>#17becf</CODE><TD>&#160;<FONT color="#17becf"><B>cyan</B></FONT>
    </TABLE>`

    If the color is the only part of the format string, you can additionally use any ``matplotlib.colors`` specification such as full names (``"green"``) or hex strings (``"#008000"``).
