There are hundreds of traditional pigments, from lampblack to burnt sienna, so we will confine ourselves to just two:
"Palette"
The Atelier is a room. "The floridly untidy loft space used by a moderately unsuccessful artist (you, that is)." The canvas, palette and paint brush are here. Understand "painting" as the canvas.
Colour is a kind of value. The colours are white, red, blue and green.
The canvas has a colour. The canvas is white. The printed name of the canvas is "largely [colour] canvas".
Painting is an action applying to one thing and one colour. Check painting: if the noun is not the canvas, say "Centuries of tradition suggest that canvas is the natural home of paint." instead. Carry out painting: now the colour of the canvas is the colour understood. Report painting: say "You splash away at the now [canvas]."
Understand "paint [something] [a colour]" as painting.
Understand "calico" as white. Understand "cerulean" or "cerulean blue" as blue.
Test me with "examine canvas / paint canvas red / examine canvas / paint canvas cerulean / examine canvas".
"Brown"
The Shipping Room is a room. The red sticky label is a thing carried by the player. The description of the red sticky label is "It reads: AIRMAIL[if the label is part of something (called the parent)]. It is stuck to [the parent][end if]."
A black crate is in Shipping. The description is "A boring black crate." The brown crate is a thing in Shipping. The description is "An ordinary brown crate."
After examining something when the label is part of the noun:
say "A bright red sticky label is attached to [the noun]!"
Here is the essential point: whenever we ATTACH LABEL TO something, it becomes part of that object.
Instead of tying the red sticky label to something:
now the red sticky label is part of the second noun;
say "You stick [the label] to [the second noun]."
And of course the label cannot be stuck to itself or to more than one thing at a time.
Before tying the label to something when the label is part of something:
if the label is part of the second noun:
say "[The label] is already stuck to [the second noun]." instead;
otherwise:
say "(first freeing the label)[line break]";
silently try taking the label;
if the label is part of something, stop the action.
Instead of tying the red sticky label to the label:
say "That would ruin the label entirely."
Instead of taking the label when the label is part of something:
now the player carries the label;
say "You peel the label off again."
Much of the rest is just tidying to make sure that the player's commands are redirected into the right syntax.
Instead of tying something to the label:
try tying the label to the noun.
Instead of putting the label on something:
try tying the label to the second noun.
Instead of inserting the label into something:
try tying the label to the second noun.
Understand the commands "stick" or "apply" as "tie".
We could have created a new "sticking" action, but to keep the example short we will use the built-in "tying" action instead, and respond to the command "stick" just as if it were "tie".
Understand "peel [something]" or "peel off [something]" as taking.
Test me with "i / put label on the black crate / look / x black / x label / get the label / apply label to brown crate / look / x brown / peel off label / stick label to label".
This would be a one-star example if it were not for the repainting:
"Early Childhood 1"
A building block is a kind of thing. A red block, a blue block and a green block are kinds of building block.
The Nursery is a room. In the Nursery are six red blocks, four blue blocks and a green block.
Test me with "look / get red block".
But a kind cannot change during play, so this will not do. Instead, the colour will have to be a property of the block. So we might first try this:
"Early Childhood 2"
Colour is a kind of value. The colours are red, blue and green. A block is a kind of thing. A block has a colour. A block is usually blue.
The Nursery is a room. In the Nursery are six red blocks, four blue blocks and a green block.
Test me with "look / get red block".
Which is fine, so far as it goes, but the colour property is not at all visible to the player, who simply sees "eleven blocks". We thought of colour as being something outwardly apparent, but Inform does not know this. To achieve a better effect, we will need features from distant chapters. The first is an activity called "printing the name of":
"Early Childhood 3"
Colour is a kind of value. The colours are red, blue and green. A block is a kind of thing. A block has a colour. A block is usually blue. Before printing the name of a block: say "[colour] ". Before printing the plural name of a block: say "[colour] ".
The Nursery is a room. In the Nursery are six red blocks, four blue blocks and a green block.
Test me with "look / get red block".
This too, however, is unsatisfactory. The individual blocks are correctly described, but we are unable to distinguish them during play: we cannot type "take a green block", for instance. And because the blocks are indistinguishable in play, they are still massed together as "eleven blocks" in room descriptions. We need to go one step further:
"Early Childhood 4"
Colour is a kind of value. The colours are red, blue and green. A block is a kind of thing. A block has a colour. A block is usually blue. Before printing the name of a block: say "[colour] ". Before printing the plural name of a block: say "[colour] ". Understand the colour property as describing a block.
The Nursery is a room. In the Nursery are six red blocks, four blue blocks and a green block.
And now everything works nicely: the blocks are grouped by colour, and can be referred to by colour, and we can even change the colour of an individual block during play, using a bit of extra trickery from later:
Understand "paint [something] [colour]" as painting it. Painting it is an action applying to one thing and one colour. Check painting it: if the noun is not a block, say "Paints are only for blocks." instead. Carry out painting it: now the colour of the noun is the colour understood. Report painting it: say "The block is now [the colour of the noun]."
Test me with "get red block / get blue block / g / i / look / paint blue block red / i / look / paint me red".