Spill: Ranges

A cell’s colour can be a range of different colours. This cell represents anything between black and red. ie: It can have anything in the red channel as long as green and blue are zero.

$: cell("R")
.red(0, 255)
.green(0)
.blue(0)

You can also define ranges with splash numbers.

$: cell("R")
.r(0, 9)
.g(0)
.b(0)

You can make a rule that applies to a whole range of colours. This rule makes anything in our range move sideways through black.

$: cell("R").r(0, 9).g(0).b(0)
$: cell("B").splash("000")

$: rule().diagram('RB => BR')

The rule above moves a range-coloured cell. You can also create a range-coloured cell. If you do that, it picks a random colour within the range.

This rule makes the screen flashes with random greeny-blue pixels.

$: cell("F")
.r(0)
.g(4, 9)
.b(4, 9)

$: rule().to("F")

That’s it. back to the spill