User Tools

Site Tools


Sidebar

Passage markup

basics

coding

extra

list

section

whitespace

Macros

basics

colour

data structure

date and time

game state

live

maths

number

revision

saving

showing and hiding

string

styling

url

deprecated

Types of data

Special keywords

Special passage tags

harlowe:background

(background: colour or String) → Changer

This styling Command alters the background colour or background image of the attached hook. Supplying a colour, or a string contanining a CSS hexadecimal colour (such as #A6A612) will set the background to a flat colour. Other strings will be interpreted as an image URL, and the background will be set to it.

Example usage:

  • (background: red + white)[Pink background]
  • (background: "#663399")[Purple background]
  • (background: "marble.png")[Marble texture background]

Details:

Combining two (background:) commands will do nothing if they both influence the colour or the image. For instance (background:red) + (background:white) will simply produce the equivalent (background:white). However, (background:red) + (background:"mottled.png") will work as intended if the background image contains transparency, allowing the background colour to appear through it.

Currently, supplying other CSS colour names (such as burlywood) is not permitted - they will be interpreted as image URLs regardless.

No error will be reported if the image at the given URL cannot be accessed.

See also:

harlowe/background.txt · Last modified: 2017/10/10 00:39 (external edit)