Reference
Grid files
The .grid format, a palette section plus 16 rows of 16 keys.
A grid file is a palette section followed by a grid section.
lower.grid
palette
. transparent
a #266325
b #347a2a
grid
................
.......bb.......
... (16 rows in all)
Palette section
Starts with the line palette, then one KEY #RRGGBB or KEY transparent line per entry. It is
normally the output of texturescript palette, pasted as is. Lines starting with # are
comments.
Grid section
Starts with the line grid, then exactly 16 rows of exactly 16 keys. Rows run top to bottom
(row 0 is the top), columns left to right. Every key must be declared in the palette section.
Coordinates
Tools that name pixels print them as (column,row), x first, counted from the top left, like
(13,6).
Refusals
grid refuses a broken file with its line, and writes nothing:
REFUSED sprout.grid:20: row is 15 wide, expected 16 like the first row
Counts
grid reports palette entries including the transparent key; lint counts only colours.