Fix: HTMLColor2RGBA() converts to incorrect value
MODIFY
www/Common.js
www/Common.js
@@ -89,7 +89,7 @@ function HTMLColor2RGBA(colorValue, defaultOpacity) {
// convert rgb(), rgba()
if (colorStr.match(/^rgba?\([\d,.\s]+\)$/)) {
matches = colorStr.match(/([\d.]+)/g);
- alpha = matches.length == 4 ? Math.floor(parseFloat(matches[3]) * 256) : alpha;
+ alpha = matches.length == 4 ? Math.floor(parseFloat(matches[3]) * 255) : alpha;
return [
parseInt(matches[0], 10),
parseInt(matches[1], 10),
@@ -101,7 +101,7 @@ function HTMLColor2RGBA(colorValue, defaultOpacity) {
// convert hsl(), hsla()
if (colorStr.match(/^hsla?\([\d%,.\s]+\)$/)) {
matches = colorStr.match(/([\d%.]+)/g);
- alpha = matches.length == 4 ? Math.floor(parseFloat(matches[3]) * 256) : alpha;
+ alpha = matches.length == 4 ? Math.floor(parseFloat(matches[3]) * 255) : alpha;
var rgb = HLStoRGB(matches[0], matches[1], matches[2]);
rgb.push(alpha);
return rgb;

Fix: HTMLColor2RGBA() converts to incorrect value

https://github.com/mapsplugin/cordova-plugin-googlemaps/issues/2640