diff options
Diffstat (limited to 'js/color.js')
| -rw-r--r-- | js/color.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/js/color.js b/js/color.js index f3826e8..56c0f54 100644 --- a/js/color.js +++ b/js/color.js @@ -1,4 +1,6 @@ +var fillColor = 1 // black + var color_names = ("white black dark-blue green red dark-red purple orange " + "yellow lime teal cyan blue magenta dark-gray light-gray").split(" "); @@ -54,3 +56,7 @@ var css_lookup = { 'rgb(127, 127, 127)': 'O', 'rgb(210, 210, 210)': 'P', }; +var css_reverse_lookup = {} +Object.keys(css_lookup).forEach(function(color){ + css_reverse_lookup[ css_lookup[color].charCodeAt(0) - 65 ] = color +}) |
