fix a bug in colours.rb
This commit is contained in:
parent
9a26fc1f2a
commit
d088493c89
1 changed files with 1 additions and 1 deletions
|
|
@ -18,7 +18,7 @@ if ARGV.size == 1
|
|||
elsif ARGV.size == 3
|
||||
rgb = ARGV[0..2]
|
||||
red,green,blue = *rgb
|
||||
if red.index '.'
|
||||
if red.index('.') || green.index('.') || blue.index('.')
|
||||
redf, greenf, bluef = red, green, blue
|
||||
red = (255 * red.to_f).to_i
|
||||
green = (255 * green.to_f).to_i
|
||||
|
|
|
|||
Loading…
Reference in a new issue