Workshop › Tetris-style Blocks › Step 5 of 32
Each filled cell's number picks its color from the list COLORS: 1 is cyan, 2 yellow, 3 purple, and so on. Index 0
is null because 0 means empty.
```js
const COLORS = [null, '#22d3ee', '#facc15', '#a855f7', '#22c55e', '#ef4444', '#3b82f6', '#f97316']
if (board[row][col]) drawCell(col, row, COLORS[board[row][col]])
```COLORS[n] is the color for the number n; index 0 is null, never used.draw now paints each cell with the color of its own number.const CELL = 24 write COLORS.draw, replace '#94a3b8' with COLORS[board[row][col]].Skills: Arrays and objects
← Draw the whole board A piece is a small grid →