Meh, really

This commit is contained in:
Zixaphir 2013-07-03 02:04:49 -07:00
parent 5ab152ee34
commit 18e3569194
3 changed files with 9 additions and 3 deletions

View File

@ -11524,8 +11524,9 @@
g: parseInt(bgHex.substr(2, 2), 16) / 255,
b: parseInt(bgHex.substr(4, 2), 16) / 255
};
return [fg, bg];
}
return [fg, bg || fg];
return [fg];
},
filter: function(_arg) {
var bg, fg;

View File

@ -11513,8 +11513,9 @@
g: parseInt(bgHex.substr(2, 2), 16) / 255,
b: parseInt(bgHex.substr(4, 2), 16) / 255
};
return [fg, bg];
}
return [fg, bg || fg];
return [fg];
},
filter: function(_arg) {
var bg, fg;

View File

@ -126,11 +126,13 @@ Style =
matrix: (foreground, background) ->
fgHex = Style.colorToHex foreground
fg = {
r: parseInt(fgHex.substr(0, 2), 16) / 255
g: parseInt(fgHex.substr(2, 2), 16) / 255
b: parseInt(fgHex.substr(4, 2), 16) / 255
}
if background
bgHex = Style.colorToHex background
@ -140,7 +142,9 @@ Style =
b: parseInt(bgHex.substr(4, 2), 16) / 255
}
[fg, bg or fg]
return [fg, bg]
[fg]
filter: ([fg, bg]) ->
"#{bg.r} #{-fg.r} 0 0 #{fg.r} #{bg.g} #{-fg.g} 0 0 #{fg.g} #{bg.b} #{-fg.b} 0 0 #{fg.b}"