0

In fillStyle="rgba(0,0,200,1)"; (1) What does 'a' mean (2)Is 0-F not the range of values for rgb? How 200 for b and still works

var canvas=document.getElementById("canvas1"); var ctx=canvas.getContext("2d"); ctx.fillStyle ="rgba(0, 0, 200, 1)"; ctx.fillRect (36, 10, 22, 22);

4th Nov 2017, 7:00 AM
Abdussamad Nasir
Abdussamad Nasir - avatar
3 Respostas
+ 2
RGB - RED, GREEN, BLUE (1) The 'a'(alpha) is for opacity, which ranges from 0 - 1 (2) 0-F is the range for hexadecimal colors not RGB colors (3) RGB color's range is from 0 - 255
4th Nov 2017, 7:08 AM
Cool Codin
Cool Codin - avatar
+ 1
What's the difference between Hexadecimal colors and RGB?
4th Nov 2017, 7:14 AM
Abdussamad Nasir
Abdussamad Nasir - avatar
0
Thanks
4th Nov 2017, 7:09 AM
Abdussamad Nasir
Abdussamad Nasir - avatar