summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorJulie Lala <jules@okfoc.us>2014-12-03 22:12:30 -0500
committerJulie Lala <jules@okfoc.us>2014-12-03 22:12:30 -0500
commit2377b7795ce2a428fd34bee7ee228f17923dfb0c (patch)
tree40ed22a508a977d40959e079f3d012aa4cbeff86 /js
parent4dd8460f6a45d7956455ef9b39b33126c1b40e15 (diff)
fix palette
Diffstat (limited to 'js')
-rw-r--r--js/color.js6
-rw-r--r--js/matrix.js4
-rw-r--r--js/ui/palette.js2
3 files changed, 5 insertions, 7 deletions
diff --git a/js/color.js b/js/color.js
index 738ad02..8f51518 100644
--- a/js/color.js
+++ b/js/color.js
@@ -1,8 +1,8 @@
var color_names = ("white black dark-blue green red dark-red purple orange " +
"yellow lime dark-cyan cyan blue magenta dark-gray light-gray").split(" ");
-var all_color_hue_order = ("black dark-blue purple dark-red red orange " +
- "yellow lime green dark-cyan cyan blue magenta dark-gray light-gray white").split(" ");
+var all_color_hue_order = ("dark-red red orange " +
+ "yellow lime green dark-cyan cyan blue dark-blue purple magenta black dark-gray light-gray white").split(" ");
var color_hue_order = "dark-red red orange yellow lime cyan dark-cyan blue dark-blue purple magenta".split(" ");
var gray_names = ("black dark-gray light-gray white").split(" ")
@@ -18,7 +18,7 @@ var colors = {}
color_names.forEach(function(name, i){ colors[name] = i })
-function all_hue (n) { return colors[color_hue_order[mod(n, 16)|0]] }
+function all_hue (n) { return colors[all_color_hue_order[mod(n, 16)|0]] }
function hue (n) { return colors[color_hue_order[mod(n, 11)|0]] }
function gray (n) { return colors[gray_names[mod(n, 4)|0]] }
function fire (n) { return colors[fire_names[mod(n, 7)|0]] }
diff --git a/js/matrix.js b/js/matrix.js
index 9809865..8d3392f 100644
--- a/js/matrix.js
+++ b/js/matrix.js
@@ -150,8 +150,6 @@ console.log(txt.length)
escaped_txt += txt[i]
}
}
- // .replace(/\x03/g, '\\x03');
- // console.log(txt)
return '/exec -out printf "' + escaped_txt + '"\n'
}
Matrix.prototype.expand = function(i){
@@ -164,5 +162,5 @@ Matrix.prototype.expand = function(i){
this.rebuild()
}
Matrix.prototype.contract = function(i){
- this .expand(-i)
+ this.expand(-i)
}
diff --git a/js/ui/palette.js b/js/ui/palette.js
index 69ccaa3..ce8078e 100644
--- a/js/ui/palette.js
+++ b/js/ui/palette.js
@@ -2,7 +2,7 @@ var palette = (function(){
var palette = new Matrix (32, 2, function(x,y){
var lex = new Lex (x,y)
- lex.bg = hue(x>>1)
+ lex.bg = all_hue(x>>1)
lex.build()
return lex
})