From f123b49d87333809cc7f1929c74c4695de4485b2 Mon Sep 17 00:00:00 2001 From: Howland Owl Date: Wed, 16 Apr 2014 21:36:39 +0300 Subject: [PATCH] bugfix: colortoarray is now returning a 4 element array --- editor/sahliedit.litcoffee | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/editor/sahliedit.litcoffee b/editor/sahliedit.litcoffee index 10fe045..bf9a1d2 100644 --- a/editor/sahliedit.litcoffee +++ b/editor/sahliedit.litcoffee @@ -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) ->