maphilight icon indicating copy to clipboard operation
maphilight copied to clipboard

Please accept hex color codes that start from a hash sign

Open gaazkam opened this issue 7 years ago • 0 comments

You only accept color codes in a format like this: <area data-maphilight='{"fillColor":"f0f0f0"}'>

Why not also accept a format like this: <area data-maphilight='{"fillColor":"#f0f0f0"}'>

I run into this issue because I have a script that assigns colors to areas and this script uses the hsvToHex function from this repo https://github.com/netbeast/colorsys , and this function outputs color codes with this hash sign in the beginning. Ofc the solution is as simple as .slice(1), but I think it would be convenient if You accepted color codes in this hash-prefixed format.

gaazkam avatar Mar 14 '17 11:03 gaazkam