summaryrefslogtreecommitdiff
path: root/js/color.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-02-07 23:40:46 -0500
committerJules Laplace <jules@okfoc.us>2015-02-07 23:40:46 -0500
commit2b040e6b7ce737e3f0eab8a25996fc2f71540713 (patch)
treeb667330fea12c079cdf8e0feefa34d06e0e6a227 /js/color.js
parentebe49c97523205a7764182c45fa213aae79e844e (diff)
load in color codes from sally HTML
Diffstat (limited to 'js/color.js')
-rw-r--r--js/color.js19
1 files changed, 19 insertions, 0 deletions
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',
+};