ArtesiaWater / field_form

An iOS and Android app to perform location-bound measurements in the field
MIT License
7 stars 2 forks source link

Most hex-strings don't work as expected #19

Open Florisklooster opened 1 year ago

Florisklooster commented 1 year ago

In the README, the following is stated: * String? color: The color of the marker on the map. Can be 'red', 'orange', 'yellow', 'green', 'cyan', 'azure', 'blue', 'violet', 'margenta' or 'rose'. The color can also be a hex-string, like '#000000' or '#FFFFFF'.

However, many hex strings, including '#000000' or '#FFFFFF', are not depicted correctly on the map, instead the default red color is shown on the map. I believe this has something to dow with the hex colors being translated into HSL colors.

By the way, in the choose groups window, the colors are properly depicted, so a marker can indeed be black or gray for example.

rubencalje commented 11 months ago

You are right, and not easy to solve. This has to do with the way the color is interpreted by the Google Maps flugin for Flutter. I added the following text to the readme:

color: The color of the marker on the map. Can be 'red', 'orange', 'yellow', 'green', 'cyan', 'azure', 'blue', 'violet', 'margenta' or 'rose'. The color can also be a hex-string, like '#0000FF' (blue) or '#FFFF00' (yellow). As these colors are converted to a hue-value to transform the original Google Maps marker, '#000000' (black) or '#FFFFFF' (white) do not give the expected result.