Finding a good book to master HTML5 can be very challenging: there are so many around - most with eye-catching titles and very complex substance.
Therefore,
Vivax Solutions strongly recommends
Core HTML5 Canvas for those who really want to delve into HTML5.
Please click the image to access
Amazon:
The animation allows you to use the three primary colours - red, gree and blue - to produce any other colour that you can think of.
In theory, it can produce 16-million colours, depending on the values of red, green and blue.
<script>
var canvas = document.getElementById('myCanvas');
var context = canvas.getContext('2d');
var radr;var radg;var radb;
function fun() {
// red value;
radr=eval(document.getElementById('redp').value);
// green value;
radg=eval(document.getElementById('greenp').value);
// blue value;
radb=eval(document.getElementById('bluep').value);
// rgb value for fillStyle
var col='rgb('+radr+','+radg+','+radb+')';
context.clearRect(0,0,400,300);
context.beginPath();
// colour circle
context.arc(200,150,100,0,2*Math.PI,false);
context.fillStyle=col;
context.fill();
}
</script>