We'll develop a program here which demonstrates how colours work on your machine. Firstly, you need to be aware that the colours that you see have three components: red, green and blue. Each colour is given an intensity value - a number between 0 and 255 - and the colour that you see will depend on the mix of these three values.
The form that we're going to use will look like this:
you need to build it according to the following specification