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}"
|
||||
|
||||
colortoarray = (color) ->
|
||||
re = /(\d\d)(\d\d)(\d\d)/
|
||||
c = color.slice 1
|
||||
c1 = c.replace re,"$1,$2,$3"
|
||||
x = (hex2dec i for i in c1.split ",")
|
||||
color = color.slice(1)
|
||||
c1 = [ color[0..1], color[2..3], color[4..5] ]
|
||||
x = (hex2dec i for i in c1)
|
||||
x.push 0
|
||||
x
|
||||
|
||||
|
||||
Need a way to convert the array back to the color name.
|
||||
|
||||
colortoname = (color) ->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue