Skip to content

Commit

Permalink
if/THEN/else
Browse files Browse the repository at this point in the history
  • Loading branch information
josip committed Mar 21, 2011
1 parent 408b36e commit 769a7c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/colour-extractor.coffee
Expand Up @@ -57,7 +57,7 @@ exports.colourKey = (path, cb) ->


exports.rgb2hex = (r, g, b) -> exports.rgb2hex = (r, g, b) ->
rgb = if arguments.length is 1 then r else [r, g, b] rgb = if arguments.length is 1 then r else [r, g, b]
'#' + rgb.map((x) -> (if x < 16 '0' else '') + x.toString(16)).join('') '#' + rgb.map((x) -> (if x < 16 then '0' else '') + x.toString(16)).join('')


exports.hex2rgb = (xs) -> exports.hex2rgb = (xs) ->
xs = xs.slice(1) if xs[0] is '#' xs = xs.slice(1) if xs[0] is '#'
Expand Down

0 comments on commit 769a7c2

Please sign in to comment.