bugfix: colortoarray is now returning a 4 element array

This commit is contained in:
Howland Owl 2014-04-16 21:36:39 +03:00
parent da4cf077cc
commit f123b49d87

View file

@ -249,13 +249,13 @@ we actually _want_ that limitation in the output.
"##{c}" "##{c}"
colortoarray = (color) -> colortoarray = (color) ->
re = /(\d\d)(\d\d)(\d\d)/ color = color.slice(1)
c = color.slice 1 c1 = [ color[0..1], color[2..3], color[4..5] ]
c1 = c.replace re,"$1,$2,$3" x = (hex2dec i for i in c1)
x = (hex2dec i for i in c1.split ",")
x.push 0 x.push 0
x x
Need a way to convert the array back to the color name. Need a way to convert the array back to the color name.
colortoname = (color) -> colortoname = (color) ->