The patterns look like this:
0 0 0
255 255 255
252 255 0
etc....
PAT
4 4
PAT
1 1 1 1
1 2 0 1
1 0 2 1
1 1 1 1
Part One: Colours
the color 0 will be defined by the first three digits,
color 1 will be defined by the next three, etc....
Part Two: Dimensions
the first digit defines the width, the second digit defines the height.
Part Three: The Scheme
the numbers define the places where the pixels will be placed, they indicate the colors defined in part one.