Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

Colors in Matplotlib

📅 2014-Jun-09 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ colors, matplotlib ⬩ 📚 Archive

Named colors can be specified by using a single character enclosed in quotes. For example, line_color = "r".

The named colors are:

b: blue
g: green
r: red
c: cyan
m: magenta
y: yellow
k: black
w: white

Other named colors can be seen illustrated here.

A RGB color can be specified in hexadecimal format as line_color = "#eeefff"

Reference: http://matplotlib.org/api/colors_api.html


© 2023 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘 Mastodon📧 Email