Is there any convenient way to change the opacity of a ol.style.Fill or ol.style.Stroke Object?
As far as I understand it, there are 2 ways to define a color with an opacity.
fill.color = [255,0,0,myOpcitay];
or
fill.color = 'rgba(255, 0,0,myOpacity)';
But what If I get a color attribute in hex format, like
var color = myStyle.getFill().getColor() // color #FF0000;
Do I really have to decompose the hex color definition in order to add the opacity? There must be a more user-friendly way to achieve this...