diff options
| author | Jules <jules@asdf.us> | 2016-04-22 11:06:08 -0400 |
|---|---|---|
| committer | Jules <jules@asdf.us> | 2016-04-22 11:06:08 -0400 |
| commit | 130a69fbfdf83c1e47344942b35abc094778109e (patch) | |
| tree | d2e8b6ecfcb697320852a44f981558f48e184513 /js | |
| parent | c5d16ddcf71e8e5e594b4b7023772b7b5fca9837 (diff) | |
populate colors lookup better
Diffstat (limited to 'js')
| -rw-r--r-- | js/color.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/js/color.js b/js/color.js index 364ae1a..a4299b1 100644 --- a/js/color.js +++ b/js/color.js @@ -19,7 +19,11 @@ var purple_names = ("dark-blue purple magenta red").split(" ") var dark_gray_names = ("black dark-blue teal dark-gray light-gray white").split(" ") var color_alphabet = "abcdefghijklmnop"; var colors = {} -color_names.forEach(function(name, i){ colors[name] = i }) +color_names.forEach(function(name, i){ + colors[name.replace("-", "")] = i + colors[name] = i +}) +colors.brown = 5 function get_inverse (n) { return colors[all_color_inv_order.indexOf(color_names[n])] } |
