This! is an RGB colour grid...
Basically it's a 2-dimensional matrix in which:
- The first row, and the first column, are red.
- The second row, and the second column, are green.
- The third row, and the third column, are blue.
Here are the colours described graphically, using the letters R, G, and B.
Here's how we calculate the colour of each space on the grid is calculated.
- Red + Red = Red (#FF0000)
- Green + Green = Green (#00FF00)
- Blue + Blue = Blue (#0000FF)
- Red + Green = Yellow (#FFFF00)
- Red + Blue = Purple (#FF00FF)
- Green + Blue = Teal (#00FFFF)
- Write code to generate an RGB colour grid.
- It's code golf, so attempt to do so in the smallest number of bytes.
- Use any programming language or markup language to generate your grid.
- Things I care about:
- The result should graphically display an RGB grid with the defined colours.
- Things I don't care about:
- If the output is an image, HTML, SVG or other markup.
- The size or shape of the colour blocks.
- Borders, spacing etc between or around the blocks.
- It definitely doesn't have to have labels telling you what the row and column colours should be.