Changing background colour doesn't work.

I’ve been trying to change the background colours on Inform. But it doesn’t work.

[code]Include Basic Screen Effects by Emily Short

Turn the background black.

I keep on getting errors about Inform not recognising the verb. Any help would be appreciated.

The above is a phrase which, like all phrases in I7, needs a context so inform knows where or when to apply it:[code]Include Basic Screen Effects by Emily Short.

Lab is a room.

When play begins:
turn the background red;
clear the screen.[/code]
Also, make sure you’re compiling to z-code; the color effects in “Basic Screen Effects” don’t work under glulx.

I have a separate question about changing the displayed colors in a game, but under glulx rather than z-code. I’ve been reading through the documentation of the “Glulx Text Effects” extension by Emily Short, and am unclear on a few issues.

Due to some interest in graphic arts, I tend to be fairly particular when using adjectives to describe the color of something. The problem with this is that a) some people may not be familiar with the subtlties of various hues, and b) different people use many different words to refer to various subtle hues. I’m not really interested in having colored-text displayed during normal gameplay, but I was thinking of adding an option in a “help” menu that would be something similar to “I keep seeing all these crazy words in the descriptions of things. What’s the difference between salmon-pink and dark salmon?” that would just be a simple list of colored words, such as:

Salmon pink
Dark salmon

etc, in case my use of color adjectives may be unclear to a reader/player. The easiest way to do this would be to just include a small graphic image consisting of a list of colored example words (which I already understand how to do), but for the sake of curiosity I was wondering how to do this with regular text.

Reading through the “Glulx Text Effects” information, however, I have two questions:

  1. The documentation says:

Am I understanding correctly that this “hex color code” (that must be converted to a decimal number) is the same value more commonly known as an HTML color code?

  1. The documentation says:

Does this mean it would not be possible to print a long list of colored words such as I was envisioning, since I would be limited to “two text styles” of my own, or am I misunderstanding the whole thing?


AKAIK, that is correct. I think you can redefine the user styles when creating a new window, but using more than two user - defined styles (which include colored text) in the same window is out.

This thread from raif might be of interest:I7:Glulx Text Effects, Better Ways to Word It (in Source Text)

In particular, note this quote from one of Aaron Reed’s posts from the above:

Also, I don’t know if you’re aware of the current discussion regarding Zarf (Andrew Plotkin)'s proposal for a new Glk style system spec., but you might want to check it out and / or make your voice heard.

The original thread from raif is here.

The proposal was reposted on ifwiki here.

The current thread on raif is here

Thanks for the response, Skinny Mike. It sounds like the “including a picture” idea is the only way to go here.

In the first link you posted, someone posted a long list of colors with an associated value for each in the format specified by the “Glulx Text Effects” extension. After researching a bit by converting the colors listed there into hexadecimal format and comparing the results to a few sample charts, it looks like the “hex color code” mentioned in the extension documentation does indeed correspond to the hexadecimal expression of RGB values that I would normally call an HTML color. Perhaps I was just being dense while reading the extension documentation.

I would note that basic colour theory provides that the perception of a colour depends on its surrounding colour. So if you put dark salmon on a white background, it will look different than dark salmon on dark blue.

Since you’re going with an image, it won’t be as unpredictable as it would be with an interpreter-modifiable variable, but it’s still something to keep in mind.

Thank you, guys!