Closed
Description
Example
import colors
echo colors.isColor("LightGrey")
echo colors.parseColor("LightGrey")
Current Output
false
/home/orthoplex/nimbug/bug.nim(3) bug
/usr/lib/nim/pure/colors.nim(456) parseColor
Error: unhandled exception: unknown color: LightGrey [ValueError]
Expected Output
true
#D3D3D3
Solution
Both procedures perform a binary search on colorNames, which is not sorted correctly.
To fix this, "lightgrey" and "lightgreen" need to be swapped.
Metadata
Metadata
Assignees
Labels
No labels