# RGB Colour Squares

So I thought a fun little thing to do would be to draw some squares using RGB and the simple double for loop. However, there are 3 different combinations that you can do:

Iterate Red and Green, leave Blue 255
Iterate Red and Blue, leave Green 255
Iterate Green and Blue, leave Red 255

What I also noticed is that these squares can be nicely lined up, and you end up with something along these lines:

However you will notice that since there are only 3 combinations (additionally proven from 3!2 = 3), this leaves a gap, which would be where yellow sits. You could implement something along these lines, but I feel it looks a little wrong:

(Leaving link as I am limited to one image for this post)

I am just wondering if some people have some insight as to how to determine the proper coloured square to fit into that spot. I also have some suspicion that this is not actually possible, just by the nature of the RGB system, and should be more appropriately displayed as a circle, connecting the two yellow sections.

If people want my current code, I have no problem sharing it!

1 Like

If each corner has to represents a primary colour, the rectangle shape doesnât seem to fit unless you break loose from the âcorner ideaâ. Itâs not without reason that they often use triangles to represent colour systems such as RGB. You seem to be aware of this though, and as I understand it youâre trying to experiment with the possibilities.

It might be inspiring to study some other colour systems. There are a lot of interesting ones out there which never became as famous as RGB. Perhaps one of these is playing around with a rectangle shape as well to represent a colour spectrum.

ps. If youâre really fond of your âcorner ideaâ, perhaps you could use the right bottom for dark colours/shade?

1 Like

Yes, I rather feared as much. Just trying some stuff out, never did too much colour theory. Was thinking where HSB might take me, but I think it wonât be that interesting. Looking into other colour schematics would be interesting!

Doubt Iâll do the dark bottom for dark colours/shades, but I will probably look into making this into some sort of ring or circle, or a triangle like you suggested.