From 2b040e6b7ce737e3f0eab8a25996fc2f71540713 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sat, 7 Feb 2015 23:40:46 -0500 Subject: load in color codes from sally HTML --- js/color.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'js/color.js') diff --git a/js/color.js b/js/color.js index 5328095..415ce5d 100644 --- a/js/color.js +++ b/js/color.js @@ -32,3 +32,22 @@ function green (n) { return colors[green_names[mod(n, 3)|0]] } function blue (n) { return colors[blue_names[mod(n, 3)|0]] } function purple (n) { return colors[purple_names[mod(n, 4)|0]] } function dark_gray (n) { return colors[dark_gray_names[mod(n, 4)|0]] } + +var css_lookup = { + 'rgb(255, 255, 255)': 'A', + 'rgb(0, 0, 0)': 'B', + 'rgb(0, 0, 127)': 'C', + 'rgb(0, 147, 0)': 'D', + 'red': 'E', + 'rgb(127, 0, 0)': 'F', + 'rgb(156, 0, 156)': 'G', + 'rgb(252, 127, 0)': 'H', + 'rgb(255, 255, 0)': 'I', + 'rgb(0, 252, 0)': 'J', + 'rgb(0, 147, 147)': 'K', + 'rgb(0, 255, 255)': 'L', + 'rgb(0, 0, 252)': 'M', + 'rgb(255, 0, 255)': 'N', + 'rgb(127, 127, 127)': 'O', + 'rgb(210, 210, 210)': 'P', +}; -- cgit v1.2.3-70-g09d2