kemayo / maphilight

jQuery plugin that adds highlighting to image maps
http://davidlynch.org/projects/maphilight/docs/
MIT License
491 stars 278 forks source link

Please accept hex color codes that start from a hash sign #79

Open gaazkam opened 7 years ago

gaazkam commented 7 years ago

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.