I would like Mathematica to produce for me a matrix $M$, where the entry $M_{ij}$ is a coloured disk with a black numeral in it, representing a billiard ball.
Basically, I want a simplified example based on the following:
(This is in fact an illustration of two orthogonal Latin squares, one in the colours and one in the numbers.)
What I would want instead is for all the purple squares to be replaced with a purple disk having the numeral "2" inside it, all the red squares replaced by a red disk with numeral "3" in it etc.
I want to construct a matrix where each row is a user-specified sequence of correctly coloured and numbered billiard balls. All rows have the same length but there need not be the same number of rows and columns.
I'll be happy for something that lets me input the sequence of numbers row by row, so that I can generate the desired output by lifting entries from a matrix. Right now I can get Mma to produce the correct coloured disks, but I cannot find a way to overlay the numerals inside the disks.
For those perfectionists the colour schemes for the (solid) billiard balls are approximately (in RGB):
- 1 (Yellow): (255, 221, 51)
- 2 (Blue): (0, 102, 204)
- 3 (Red): (204, 0, 0)
- 4 (Purple): (102, 0, 153)
- 5 (Orange): (255, 102, 0)
- 6 (Green): (0, 153, 0)
- 7 (Burgundy/Maroon): (153, 51, 51)
- 8 (Black): (0, 0, 0)








