Encoding a picture with a colour key
A list that says which number stands for which colour. To encode a picture, write each pixel's colour number in a grid, row by row, for a partner to decode.
Understanding Encoding a picture with a colour key in ACARA Digital Technologies Years 5–6
What it does: Encoding means turning a colour into its number using the colour key, one pixel at a time. Each row of numbers matches one row of pixels, so a partner can decode the grid by using the same key. The colour key says 1 stands for red, so you write 1 for every red pixel. Go left to right and swap each colour for its number: white 0, green 1, green 1, white 0. A colour key only works if every colour has a different number, such as 1 = red and 2 = blue.
Common mistakes: The colour key says 1 stands for red and 2 stands for blue. A red pixel must be written as 1, not 2. The key is swapped. The code 1 0 1 for black white black only works if 1=black and 0=white, so the key must be 0=white 1=black.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 59–71) and word search (Modules 44–71).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
colour keyFill in the Blanks
Spot the Error
Student with a class code? Join your class →