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:
Matt Wozniski 2009-02-06 02:26:17 -05:00
parent 148a307714
commit a55012c758

View File

@ -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)