|
6 | 6 | defmodule Scenic.Color do
|
7 | 7 | alias Scenic.Themes
|
8 | 8 |
|
9 |
| - @named_colors %{ |
10 |
| - alice_blue: {0xF0, 0xF8, 0xFF}, |
11 |
| - antique_white: {0xFA, 0xEB, 0xD7}, |
12 |
| - aqua: {0x00, 0xFF, 0xFF}, |
13 |
| - aquamarine: {0x7F, 0xFF, 0xD4}, |
14 |
| - azure: {0xF0, 0xFF, 0xFF}, |
15 |
| - beige: {0xF5, 0xF5, 0xDC}, |
16 |
| - bisque: {0xFF, 0xE4, 0xC4}, |
17 |
| - black: {0x00, 0x00, 0x00}, |
18 |
| - blanched_almond: {0xFF, 0xEB, 0xCD}, |
19 |
| - blue: {0x00, 0x00, 0xFF}, |
20 |
| - blue_violet: {0x8A, 0x2B, 0xE2}, |
21 |
| - brown: {0xA5, 0x2A, 0x2A}, |
22 |
| - burly_wood: {0xDE, 0xB8, 0x87}, |
23 |
| - cadet_blue: {0x5F, 0x9E, 0xA0}, |
24 |
| - chartreuse: {0x7F, 0xFF, 0x00}, |
25 |
| - chocolate: {0xD2, 0x69, 0x1E}, |
26 |
| - coral: {0xFF, 0x7F, 0x50}, |
27 |
| - cornflower_blue: {0x64, 0x95, 0xED}, |
28 |
| - cornsilk: {0xFF, 0xF8, 0xDC}, |
29 |
| - crimson: {0xDC, 0x14, 0x3C}, |
30 |
| - cyan: {0x00, 0xFF, 0xFF}, |
31 |
| - dark_blue: {0x00, 0x00, 0x8B}, |
32 |
| - dark_cyan: {0x00, 0x8B, 0x8B}, |
33 |
| - dark_golden_rod: {0xB8, 0x86, 0x0B}, |
34 |
| - dark_gray: {0xA9, 0xA9, 0xA9}, |
35 |
| - dark_grey: {0xA9, 0xA9, 0xA9}, |
36 |
| - dark_green: {0x00, 0x64, 0x00}, |
37 |
| - dark_khaki: {0xBD, 0xB7, 0x6B}, |
38 |
| - dark_magenta: {0x8B, 0x00, 0x8B}, |
39 |
| - dark_olive_green: {0x55, 0x6B, 0x2F}, |
40 |
| - dark_orange: {0xFF, 0x8C, 0x00}, |
41 |
| - dark_orchid: {0x99, 0x32, 0xCC}, |
42 |
| - dark_red: {0x8B, 0x00, 0x00}, |
43 |
| - dark_salmon: {0xE9, 0x96, 0x7A}, |
44 |
| - dark_sea_green: {0x8F, 0xBC, 0x8F}, |
45 |
| - dark_slate_blue: {0x48, 0x3D, 0x8B}, |
46 |
| - dark_slate_gray: {0x2F, 0x4F, 0x4F}, |
47 |
| - dark_slate_grey: {0x2F, 0x4F, 0x4F}, |
48 |
| - dark_turquoise: {0x00, 0xCE, 0xD1}, |
49 |
| - dark_violet: {0x94, 0x00, 0xD3}, |
50 |
| - deep_pink: {0xFF, 0x14, 0x93}, |
51 |
| - deep_sky_blue: {0x00, 0xBF, 0xFF}, |
52 |
| - dim_gray: {0x69, 0x69, 0x69}, |
53 |
| - dim_grey: {0x69, 0x69, 0x69}, |
54 |
| - dodger_blue: {0x1E, 0x90, 0xFF}, |
55 |
| - fire_brick: {0xB2, 0x22, 0x22}, |
56 |
| - floral_white: {0xFF, 0xFA, 0xF0}, |
57 |
| - forest_green: {0x22, 0x8B, 0x22}, |
58 |
| - fuchsia: {0xFF, 0x00, 0xFF}, |
59 |
| - gainsboro: {0xDC, 0xDC, 0xDC}, |
60 |
| - ghost_white: {0xF8, 0xF8, 0xFF}, |
61 |
| - gold: {0xFF, 0xD7, 0x00}, |
62 |
| - golden_rod: {0xDA, 0xA5, 0x20}, |
63 |
| - gray: {0x80, 0x80, 0x80}, |
64 |
| - grey: {0x80, 0x80, 0x80}, |
65 |
| - green: {0x00, 0x80, 0x00}, |
66 |
| - green_yellow: {0xAD, 0xFF, 0x2F}, |
67 |
| - honey_dew: {0xF0, 0xFF, 0xF0}, |
68 |
| - hot_pink: {0xFF, 0x69, 0xB4}, |
69 |
| - indian_red: {0xCD, 0x5C, 0x5C}, |
70 |
| - indigo: {0x4B, 0x00, 0x82}, |
71 |
| - ivory: {0xFF, 0xFF, 0xF0}, |
72 |
| - khaki: {0xF0, 0xE6, 0x8C}, |
73 |
| - lavender: {0xE6, 0xE6, 0xFA}, |
74 |
| - lavender_blush: {0xFF, 0xF0, 0xF5}, |
75 |
| - lawn_green: {0x7C, 0xFC, 0x00}, |
76 |
| - lemon_chiffon: {0xFF, 0xFA, 0xCD}, |
77 |
| - light_blue: {0xAD, 0xD8, 0xE6}, |
78 |
| - light_coral: {0xF0, 0x80, 0x80}, |
79 |
| - light_cyan: {0xE0, 0xFF, 0xFF}, |
80 |
| - light_golden_rod: {0xFA, 0xFA, 0xD2}, |
81 |
| - light_golden_rod_yellow: {0xFA, 0xFA, 0xD2}, |
82 |
| - light_gray: {0xD3, 0xD3, 0xD3}, |
83 |
| - light_grey: {0xD3, 0xD3, 0xD3}, |
84 |
| - light_green: {0x90, 0xEE, 0x90}, |
85 |
| - light_pink: {0xFF, 0xB6, 0xC1}, |
86 |
| - light_salmon: {0xFF, 0xA0, 0x7A}, |
87 |
| - light_sea_green: {0x20, 0xB2, 0xAA}, |
88 |
| - light_sky_blue: {0x87, 0xCE, 0xFA}, |
89 |
| - light_slate_gray: {0x77, 0x88, 0x99}, |
90 |
| - light_slate_grey: {0x77, 0x88, 0x99}, |
91 |
| - light_steel_blue: {0xB0, 0xC4, 0xDE}, |
92 |
| - light_yellow: {0xFF, 0xFF, 0xE0}, |
93 |
| - lime: {0x00, 0xFF, 0x00}, |
94 |
| - lime_green: {0x32, 0xCD, 0x32}, |
95 |
| - linen: {0xFA, 0xF0, 0xE6}, |
96 |
| - magenta: {0xFF, 0x00, 0xFF}, |
97 |
| - maroon: {0x80, 0x00, 0x00}, |
98 |
| - medium_aqua_marine: {0x66, 0xCD, 0xAA}, |
99 |
| - medium_blue: {0x00, 0x00, 0xCD}, |
100 |
| - medium_orchid: {0xBA, 0x55, 0xD3}, |
101 |
| - medium_purple: {0x93, 0x70, 0xDB}, |
102 |
| - medium_sea_green: {0x3C, 0xB3, 0x71}, |
103 |
| - medium_slate_blue: {0x7B, 0x68, 0xEE}, |
104 |
| - medium_spring_green: {0x00, 0xFA, 0x9A}, |
105 |
| - medium_turquoise: {0x48, 0xD1, 0xCC}, |
106 |
| - medium_violet_red: {0xC7, 0x15, 0x85}, |
107 |
| - midnight_blue: {0x19, 0x19, 0x70}, |
108 |
| - mint_cream: {0xF5, 0xFF, 0xFA}, |
109 |
| - misty_rose: {0xFF, 0xE4, 0xE1}, |
110 |
| - moccasin: {0xFF, 0xE4, 0xB5}, |
111 |
| - navajo_white: {0xFF, 0xDE, 0xAD}, |
112 |
| - navy: {0x00, 0x00, 0x80}, |
113 |
| - old_lace: {0xFD, 0xF5, 0xE6}, |
114 |
| - olive: {0x80, 0x80, 0x00}, |
115 |
| - olive_drab: {0x6B, 0x8E, 0x23}, |
116 |
| - orange: {0xFF, 0xA5, 0x00}, |
117 |
| - orange_red: {0xFF, 0x45, 0x00}, |
118 |
| - orchid: {0xDA, 0x70, 0xD6}, |
119 |
| - pale_golden_rod: {0xEE, 0xE8, 0xAA}, |
120 |
| - pale_green: {0x98, 0xFB, 0x98}, |
121 |
| - pale_turquoise: {0xAF, 0xEE, 0xEE}, |
122 |
| - pale_violet_red: {0xDB, 0x70, 0x93}, |
123 |
| - papaya_whip: {0xFF, 0xEF, 0xD5}, |
124 |
| - peach_puff: {0xFF, 0xDA, 0xB9}, |
125 |
| - peru: {0xCD, 0x85, 0x3F}, |
126 |
| - pink: {0xFF, 0xC0, 0xCB}, |
127 |
| - plum: {0xDD, 0xA0, 0xDD}, |
128 |
| - powder_blue: {0xB0, 0xE0, 0xE6}, |
129 |
| - purple: {0x80, 0x00, 0x80}, |
130 |
| - rebecca_purple: {0x66, 0x33, 0x99}, |
131 |
| - red: {0xFF, 0x00, 0x00}, |
132 |
| - rosy_brown: {0xBC, 0x8F, 0x8F}, |
133 |
| - royal_blue: {0x41, 0x69, 0xE1}, |
134 |
| - saddle_brown: {0x8B, 0x45, 0x13}, |
135 |
| - salmon: {0xFA, 0x80, 0x72}, |
136 |
| - sandy_brown: {0xF4, 0xA4, 0x60}, |
137 |
| - sea_green: {0x2E, 0x8B, 0x57}, |
138 |
| - sea_shell: {0xFF, 0xF5, 0xEE}, |
139 |
| - sienna: {0xA0, 0x52, 0x2D}, |
140 |
| - silver: {0xC0, 0xC0, 0xC0}, |
141 |
| - sky_blue: {0x87, 0xCE, 0xEB}, |
142 |
| - slate_blue: {0x6A, 0x5A, 0xCD}, |
143 |
| - slate_gray: {0x70, 0x80, 0x90}, |
144 |
| - slate_grey: {0x70, 0x80, 0x90}, |
145 |
| - snow: {0xFF, 0xFA, 0xFA}, |
146 |
| - spring_green: {0x00, 0xFF, 0x7F}, |
147 |
| - steel_blue: {0x46, 0x82, 0xB4}, |
148 |
| - tan: {0xD2, 0xB4, 0x8C}, |
149 |
| - teal: {0x00, 0x80, 0x80}, |
150 |
| - thistle: {0xD8, 0xBF, 0xD8}, |
151 |
| - tomato: {0xFF, 0x63, 0x47}, |
152 |
| - turquoise: {0x40, 0xE0, 0xD0}, |
153 |
| - violet: {0xEE, 0x82, 0xEE}, |
154 |
| - wheat: {0xF5, 0xDE, 0xB3}, |
155 |
| - white: {0xFF, 0xFF, 0xFF}, |
156 |
| - white_smoke: {0xF5, 0xF5, 0xF5}, |
157 |
| - yellow: {0xFF, 0xFF, 0x00}, |
158 |
| - yellow_green: {0x9A, 0xCD, 0x32} |
159 |
| - } |
160 |
| - |
161 | 9 | @moduledoc """
|
162 | 10 | APIs to create and work with colors.
|
163 | 11 |
|
@@ -201,8 +49,6 @@ defmodule Scenic.Color do
|
201 | 49 | a list of all the color names. I'll eventually add a link to a page that shows them
|
202 | 50 | visually.
|
203 | 51 |
|
204 |
| - #{inspect(Enum.map(@named_colors, fn {k, _v} -> k end) |> Enum.sort(), limit: :infinity, pretty: true)} |
205 |
| -
|
206 | 52 |
|
207 | 53 | ## Additional Named Colors
|
208 | 54 |
|
@@ -615,6 +461,7 @@ defmodule Scenic.Color do
|
615 | 461 | end
|
616 | 462 |
|
617 | 463 | # --------------------------------------------------------
|
| 464 | + @spec named :: map |
618 | 465 | @doc """
|
619 | 466 | Return map of all named colors and their values
|
620 | 467 | """
|
|
0 commit comments