bugfix: colortoarray is now returning a 4 element array
This commit is contained in:
parent
da4cf077cc
commit
f123b49d87
1 changed files with 4 additions and 4 deletions
|
|
@ -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) ->
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue