Colour mixing for pixel art: RGB, hex codes and colour palettes
If you've mixed paint, you know blue and yellow make green. On a screen, colours work differently. Understanding how is useful for pixel art, web design and any game you make.
Paint: mixing makes darker
Paint absorbs some light and reflects the rest. The more paints you mix, the more light gets absorbed, and the darker and muddier the colour becomes. This is called subtractive mixing. Printers use cyan, magenta and yellow ink for the same reason.
Screens: mixing makes lighter
A screen gives off light. Each tiny pixel is made of red, green and blue lights, and every colour you see is a mix of those three. The more light you add, the brighter it gets. Red and green light together make yellow, all three at full strength make white, and all three off make black. This is additive mixing, and it's why computers describe colours as RGB.
Hex codes
In web pages and many art tools, colours are written as hex codes like #FF8800. The six characters are three pairs: red, green and blue. Each pair goes from 00 (none) to FF (full), using the numbers 0 to 9 and letters A to F. So:
#FF0000is pure red.#00FF00is pure green.#FFFF00is red plus green: yellow.#FF8800is full red with half green: orange.#808080is all three at half: grey.
Once you know this, you can guess a colour just by reading its code.
Choosing colours that work together
Pixel art usually uses a small set of colours, called a palette. A few ideas for choosing one:
- Shades: for each main colour, pick a darker version for shadows and a lighter one for highlights.
- Warm shadows, cool shadows: artists often make shadows slightly bluer or purpler instead of just darker, which looks more natural.
- Complementary colours: colours opposite each other on a colour wheel (blue and orange, purple and yellow) make each other stand out.
- Fewer is better: many famous pixel-art games used tiny palettes. Limits force clever choices.
Contrast matters
The most important thing in a game sprite isn't colour, it's contrast: light against dark. A character should stand out from the background even if you squint. Try turning your art black and white: if you can still see the shape clearly, the contrast is good.
Try it
Make a sprite in Pixel Paint using just four colours: an outline, a main colour, a shadow and a highlight. For more, read pixel art for beginners.