Fix a silly mistake.
This bug would stop CSApprox from ever choosing #080808 (or the lowest color on the greyscale ramp of another palette) as the closest match for any color.
This commit is contained in:
parent
148a307714
commit
a55012c758
@ -118,7 +118,7 @@ function! s:ApproximatePerComponent(r,g,b)
|
||||
let b = s:NearestElemInList(a:b, greys_colors)
|
||||
|
||||
let len = len(colors)
|
||||
if (r == g && g == b && index(greys, r) > 0)
|
||||
if (r == g && g == b && index(greys, r) != -1)
|
||||
let rv = 16 + len * len * len + index(greys, r)
|
||||
else
|
||||
let r = s:NearestElemInList(a:r, colors)
|
||||
|
Loading…
Reference in New Issue
Block a user