When I saw the title, I thought of Lambda Calculus[0] and SKI combinators[1]. Given that there are "only six useful colors", I wonder if M&Ms could be used to implement them.
Gist: https://gist.github.com/mufeedvh/db930a423fdce8c1d8e495c7a3f...
With:
uv run mnm decompile path/to/photo.png --mode photo