Tile colours

A node of the Style graph, in the Colour group.

The frame in tiles from its top left, each held to so many colours, as the NES lays out 8 × 8 tiles of 3: the colours most used stay (a pixel three of its neighbours contradict counts as theirs, so a rasterizer's edge pixel does not swing the choice), the rest take the nearest of them, and a pixel left alone in its colour takes its neighbours' in the tile.

Takes: layer (layer), size (number), colours (number) · Gives: layer

Settings

SettingWhat it doesRangeDefault
Tile
size
How big a tile is, in pixels: 8 for the NES. 1 to 64 8
Colours How many colours one tile may use, transparent aside. 1 to 16 3

Every setting is also an input: wire a value into it to change it per pixel. On the command line: pxr graph set game.pixor --which style --node tile-colours --set KEY=VALUE.

Wire it
layer → layer
Settings
Tile, Colours

What it wires to

Its layer input takes a layer, which these give: CRT, Output, Cleanup, Combine, Lines, Mesh edges, Shading, To palette, Choose by mask, Dither mix, Flatten, Hatch, and 17 more.

What it gives, a layer, goes into: CRT, Output, Cleanup, Combine, Lines, Mesh edges, Choose by mask, Colour edges, Dither mix, Flatten, Layer over, Paint, and 9 more.

In the app, drag a wire from one of its dots: every dot the wire fits is ringed.

How it fits with the rest: the Style graph in the manual.

In the same group

Palette · Step the ramp · Step where masked · Flatten · Nearest colour · Palette dither · Ramp map · Sub-pixel motion