Color · Act I

Similarly to Color Lookup, a simple way to improve lighting in a pixel art scene is to map colors to a table you picked by hand (for darker and darker tones, for instance). Instead of simply multiplying / adding values!
Light my scene without leaving the palette: each color steps down its own ramp, dithered between steps.
Read the whole briefFold the brief
Light my [night street] without leaving my palette: [Endesga 32]. - Give every palette color a ramp: the color as drawn, then [4] steps down. I choose them by hand. - Let a shadow shift its hue as it deepens: [warm colors go down through browns into night blue]. No ramp ends in black. - Draw the scene as in full light. Draw the lights into a separate gray picture: strength only. - For each pixel: find its color's ramp and go down it by the light it lacks. Never multiply, never blend. - Between two steps, an ordered [4 x 4] dither fixed to the pixel grid, in a narrow band. The rest of a step is flat. - Several lights add their strengths, then one lookup. - Bake it as a lookup table: a row for each color, a column for each light level. - Check it: count the colors on screen. There must never be more than the palette has. Show me one lit frame and its color count before you wire it in.
Change what stands in [brackets] to fit your game.
- A fixed-palette game with lights that move: a lantern, a torch, dusk falling. Shadows keep the hue shifts you would have drawn by hand. I highly suggest learning about color theory: it is fascinating!
- Things that show only in the dark, or only in light: a ramp can end on any color, so a creature's eyes can stay lit in shadow.
Not forColored lights: only a light's strength is read, so a red lamp and a blue one light alike. Art that is off the palette has no ramp to walk.
LutLight2D gives each palette color a hand-set shading gradient and replaces colors by the lighting's brightness.[1] PickyPixels keeps a color ramp for each pixel of a texture.[2] The street and its dither are this atlas's own.
- NullTale, LutLight2D, GitHub, 2023
- auranym, PickyPixels, GitHub, 2024
Art that is off the palette has no ramp to walk. Palette Snapper puts any sprite on your palette: free, open source, in your browser.
Open Palette Snapper