The same pinned category order encodes every displayed known-category row.
Encode all shown rows
Rows A, B, and C use the known colors red, blue, and green. Each row gets an integer indicator pattern.
A,B,C→indicator rows
Row B turns on blue
Row B has color blue, so blue is 1 while red, green, and other are 0.
Bblue=(0,1,0,0)
Row C turns on green
Row C has color green, so the green column is 1 and the other shown columns are 0.
Cgreen=(0,0,1,0)