You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.The text was updated successfully, but these errors were encountered: