matplotlib에서 사용하는 color 정보 입니다.
matplotlib 사이트에 있는 프로그램 소스를 가져와 color 명칭을 복사해서 사용하기 위해 몇 줄 추가를 했습니다.
https://matplotlib.org/examples/color/named_colors.html
이곳에 가시면 좀더 깔끔한 원본을 볼 수 있습니다.
여기는 개인적으로 컬러 값 복사용으로 사용하려고 만들어 봤습니다.
1. Color Table
2. Color Name
black(#000000) | k(0,0,0) | dimgray(#696969) | dimgrey(#696969) |
gray(#808080) | grey(#808080) | darkgray(#A9A9A9) | darkgrey(#A9A9A9) |
silver(#C0C0C0) | lightgray(#D3D3D3) | lightgrey(#D3D3D3) | gainsboro(#DCDCDC) |
whitesmoke(#F5F5F5) | w(1,1,1) | white(#FFFFFF) | snow(#FFFAFA) |
rosybrown(#BC8F8F) | lightcoral(#F08080) | indianred(#CD5C5C) | brown(#A52A2A) |
firebrick(#B22222) | maroon(#800000) | darkred(#8B0000) | r(1,0,0) |
red(#FF0000) | mistyrose(#FFE4E1) | salmon(#FA8072) | tomato(#FF6347) |
darksalmon(#E9967A) | coral(#FF7F50) | orangered(#FF4500) | lightsalmon(#FFA07A) |
sienna(#A0522D) | seashell(#FFF5EE) | chocolate(#D2691E) | saddlebrown(#8B4513) |
sandybrown(#F4A460) | peachpuff(#FFDAB9) | peru(#CD853F) | linen(#FAF0E6) |
bisque(#FFE4C4) | darkorange(#FF8C00) | burlywood(#DEB887) | antiquewhite(#FAEBD7) |
tan(#D2B48C) | navajowhite(#FFDEAD) | blanchedalmond(#FFEBCD) | papayawhip(#FFEFD5) |
moccasin(#FFE4B5) | orange(#FFA500) | wheat(#F5DEB3) | oldlace(#FDF5E6) |
floralwhite(#FFFAF0) | darkgoldenrod(#B8860B) | goldenrod(#DAA520) | cornsilk(#FFF8DC) |
gold(#FFD700) | lemonchiffon(#FFFACD) | khaki(#F0E68C) | palegoldenrod(#EEE8AA) |
darkkhaki(#BDB76B) | ivory(#FFFFF0) | beige(#F5F5DC) | lightyellow(#FFFFE0) |
lightgoldenrodyellow(#FAFAD2) | olive(#808000) | y(0.75,0.75,0) | yellow(#FFFF00) |
olivedrab(#6B8E23) | yellowgreen(#9ACD32) | darkolivegreen(#556B2F) | greenyellow(#ADFF2F) |
chartreuse(#7FFF00) | lawngreen(#7CFC00) | honeydew(#F0FFF0) | darkseagreen(#8FBC8F) |
palegreen(#98FB98) | lightgreen(#90EE90) | forestgreen(#228B22) | limegreen(#32CD32) |
darkgreen(#006400) | g(0,0.5,0) | green(#008000) | lime(#00FF00) |
seagreen(#2E8B57) | mediumseagreen(#3CB371) | springgreen(#00FF7F) | mintcream(#F5FFFA) |
mediumspringgreen(#00FA9A) | mediumaquamarine(#66CDAA) | aquamarine(#7FFFD4) | turquoise(#40E0D0) |
lightseagreen(#20B2AA) | mediumturquoise(#48D1CC) | azure(#F0FFFF) | lightcyan(#E0FFFF) |
paleturquoise(#AFEEEE) | darkslategray(#2F4F4F) | darkslategrey(#2F4F4F) | teal(#008080) |
darkcyan(#008B8B) | c(0,0.75,0.75) | aqua(#00FFFF) | cyan(#00FFFF) |
darkturquoise(#00CED1) | cadetblue(#5F9EA0) | powderblue(#B0E0E6) | lightblue(#ADD8E6) |
deepskyblue(#00BFFF) | skyblue(#87CEEB) | lightskyblue(#87CEFA) | steelblue(#4682B4) |
aliceblue(#F0F8FF) | dodgerblue(#1E90FF) | lightslategray(#778899) | lightslategrey(#778899) |
slategray(#708090) | slategrey(#708090) | lightsteelblue(#B0C4DE) | cornflowerblue(#6495ED) |
royalblue(#4169E1) | ghostwhite(#F8F8FF) | lavender(#E6E6FA) | midnightblue(#191970) |
navy(#000080) | darkblue(#00008B) | mediumblue(#0000CD) | b(0,0,1) |
blue(#0000FF) | slateblue(#6A5ACD) | darkslateblue(#483D8B) | mediumslateblue(#7B68EE) |
mediumpurple(#9370DB) | rebeccapurple(#663399) | blueviolet(#8A2BE2) | indigo(#4B0082) |
darkorchid(#9932CC) | darkviolet(#9400D3) | mediumorchid(#BA55D3) | thistle(#D8BFD8) |
plum(#DDA0DD) | violet(#EE82EE) | purple(#800080) | darkmagenta(#8B008B) |
m(0.75,0,0.75) | fuchsia(#FF00FF) | magenta(#FF00FF) | orchid(#DA70D6) |
mediumvioletred(#C71585) | deeppink(#FF1493) | hotpink(#FF69B4) | lavenderblush(#FFF0F5) |
palevioletred(#DB7093) | crimson(#DC143C) | pink(#FFC0CB) | lightpink(#FFB6C1) |
3. Source Code
"""
========================
Visualizing named colors
========================
Simple plot example with the named colors and its visual representation.
"""
from __future__ import division
import matplotlib.pyplot as plt
from matplotlib import colors as mcolors
colors = dict(mcolors.BASE_COLORS, **mcolors.CSS4_COLORS)
# Sort colors by hue, saturation, value and name.
by_hsv = sorted((tuple(mcolors.rgb_to_hsv(mcolors.to_rgba(color)[:3])), name)
for name, color in colors.items())
sorted_names = [name for hsv, name in by_hsv]
n = len(sorted_names)
ncols = 4
nrows = n // ncols + 1
fig, ax = plt.subplots(figsize=(8, 5))
# Get height and width
X, Y = fig.get_dpi() * fig.get_size_inches()
h = Y / (nrows + 1)
w = X / ncols
for i, name in enumerate(sorted_names):
col = i % ncols
row = i // ncols
y = Y - (row * h) - h
xi_line = w * (col + 0.05)
xf_line = w * (col + 0.25)
xi_text = w * (col + 0.3)
color_name = name + '(' + str(colors[name]) +')'
if col == 3:
print("{:35}".format( color_name ), end='\n')
else:
print("{:35}".format( color_name ), end = "")
ax.text(xi_text, y, name, fontsize=(h * 0.8), horizontalalignment='left',verticalalignment='center')
ax.hlines(y + h * 0.1, xi_line, xf_line, color=colors[name], linewidth=(h * 0.6))
ax.set_xlim(0, X)
ax.set_ylim(0, Y)
ax.set_axis_off()
fig.subplots_adjust(left=0, right=1, top=1, bottom=0,hspace=0, wspace=0)
plt.show()
- copy coding -
'Tensorflow' 카테고리의 다른 글
[텐서플로우] Tensorflow MNIST 숫자 이미지 하나 불러와서 맞추기 (6) | 2019.02.08 |
---|---|
[텐서플로우] Unknown initializer: GlorotUniform 오류 keras model_from_json() 호출 (0) | 2019.02.07 |
[텐서플로우] 텐서보드 (TensorBoard) 실행 하기 (1) | 2019.01.22 |
[텐서플로우] 안드로이드 + 텐서플로우 Lite 버전 GitHub 공개 소스 테스트 (9) | 2019.01.21 |
[텐서플로우] ModuleNotFoundError: No module named 'tensorflow' 오류 해결 방법 (15) | 2019.01.11 |