I have to fill an image with r g b a component. It is working with function something.fillStyle = " rgba ("+r+","+g+","+b+","+a+")"; but i want to use something.fillStyle = value where value is the color value in hex of the form alpha r g b. When value is #ffff00 (yellow) it is fine but when I use a value with alpha (#ffffff00) it is always black. Is there any way to do this?
I have to fill an image with r g b a component. It is
Share
This is not possible, see http://www.w3.org/TR/css3-color/#numerical. Hex color values don’t allow setting the “alpha” value, that’s only possible with
rgbaandhsla.