I’m experimenting with colour in my ZIL, looking ideally to change the whole background colour and also the text colour.
I’ve added <COLOR 5 8> to my code and the result is a little funky! It has only changed certain areas, the rest remain the default colour (brown and orange).
Any ideas please?!
With the Z-Machine, changing the colours just affects all future output - anything already on the window stays as it is. If you want the whole window to update to the new colours, you have to erase the window.
Interesting, thanks David! I’ll work with that.
LIGHT BLUE 8
LIGHT GREY 10
MEDIUM GREY 11
DARK GREY 12
Note that, if you subtract two from all of these, they’re easier to remember: the 0x1 bit is the red channel, the 0x2 bit is the green channel, and the 0x4 bit is the blue channel. (They’re shifted by two to make room for 0=current and 1=default.)
The three grays, along with 15=transparent and -1=whatever’s under the cursor, I believe were added in Z6. Which is why they don’t fit the pattern of the others.
of course, back in Infocom days (and the variety of machines and text mode palettes) colour number wasn’t associated to a specific machine… so I think that is unwise assigning color names to the numbers (only the C=64 has three grays in its 16 colour palette; 8 bit Atari has a single-color for the text mode, char and background being differentiated by their luminance; Amiga text mode has only four colours from a palette of 4096, and so on)
Best regards from Italy,
Oh, interesting; do we know how the different official Infocom interpreters reacted to the different numbers?
Good question, I may have a play and compile the same test file to the different machine versions to see what happens!