palettes
Drives the `pixelPalette` post pass and holds its palettes (Dusk Garden, Moss & Moon, Ember Riso, plus any you `register`). `apply({ palette, enabled, rows, dither, outline, saturation, contrast })` registers the pass on first use and writes only what changed; `remove()` takes it…
palettes
Drives the pixelPalette post pass and holds its palettes (Dusk Garden, Moss
& Moon, Ember Riso, plus any you register). apply({ palette, enabled, rows, dither, outline, saturation, contrast }) registers the pass on first
use and writes only what changed; remove() takes it off. Gives any scene —
Gaussian splats or meshes — an indexed pixel-art look.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2module palettes The pixel-art palette post pass (`pixelPalette.shader`) and the palettes it maps the frame to: cuts the picture into square cells, snaps each to the nearest ink of an indexed palette in OKLab with a 4x4 ordered dither between the two nearest inks, and outlines strong value edges with the darkest ink. `apply` registers the pass on first use and only writes the properties that changed. Works over any scene, splats or meshes. `PixelPalette.component` wraps it for no-code use. (Named `palettes` so it does not share the shader's identity.)
hexCode(h: string) → void
| arg | type | description |
|---|---|---|
| h | string |
find(which: any) → number
The index of a palette by name or (1-based, wrapping) number.
| arg | type | description |
|---|---|---|
| which | any | Palette name or number. |
examples
palettes.find("Ember Riso")register(name: string, colors: { string }) → number
Add a palette (or replace the one with the same name).
| arg | type | description |
|---|---|---|
| name | string | Palette name. |
| colors | { string } | Up to 24 `"#rrggbb"` inks, darkest first. |
examples
palettes.register("Game Boy", { "#0f380f", "#306230", "#8bac0f", "#9bbc0f" })ensure( ) → void
Make sure the pass is registered on this peer's post chain.
examples
palettes.ensure()
set(key: string, value: any) → void
| arg | type | description |
|---|---|---|
| key | string | |
| value | any |
apply(opts: { [string]: any }) →
Apply palette settings to this peer's screen, writing only what changed. Every key is optional. dither = 0..1, outline = 0..1, saturation = 0..2, contrast = 0.5..2 }`.
| arg | type | description |
|---|---|---|
| opts | { [string]: any } | `{ palette = name|number, enabled = bool, rows = cells tall, |
examples
palettes.apply({ palette = "Moss & Moon", rows = 180, dither = 0.5 })remove( ) → void
Take the pass off this peer's post chain.
examples
palettes.remove()
Pixel-art palette post effect driver with built-in palettes and palette registration.Sub-parts
Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.
Showing up to 3 levels deep. Open a part to see what it holds further down.
Problems
Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.
agent_score is exposed.+ quality × 0.35
+ performance × 0.25
± compat factor
Usability ratings
Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".
Scoped to this part · feeds back into the world's score.