Chris Collins

Tools · retro

Copper gradients and raster bars

Design colour gradients and shaded raster bars, see them quantised to Amiga OCS/ECS, AGA, Atari ST or STE colour depth with optional dithering, and export a copper list with the line-255 wrap handled, a UCopList in C, an HBL colour table, a palette ramp, or a sine table.

Added

How to use it

Gradient

Set colour stops with the colour pickers and sliders (or type #rrggbb), or start from a preset — copper sky, sunset, fire, ocean, a metal bar, rainbow. Blend in OKLab keeps the brightness even along the gradient; RGB is the plain mix demo coders used by hand. Lines per step makes chunky bands (2 or 4 lines per colour gives the classic look).

Raster bars

Pick bar colours, a background, a height and a shading profile: rounded lights the bar like a cylinder with a highlight, linear is a triangle ramp, flat is one colour. Swing and Frames per cycle move the bars on a sine wave, each offset by Phase between bars; press Play to watch, and export the Sine table to drive them in your own code. Later bars cover earlier ones, as when each bar’s copper block is written in order.

Hardware preview

The right-hand preview shows exactly the colours the machine can show. OCS and ECS Amigas and the STE have 4 bits per channel (16 levels), the ST 3 bits (8 levels), and AGA 8 bits. Dithering hides the steps: ordered uses a fixed pattern down the lines, error diffusion carries the rounding error to the next line.

Output

  • Copper list (Amiga) — dc.w pairs: a WAIT for each line whose colour changes and a MOVE to the chosen colour register (COLOR00 is the background). The first line defaults to $2C, the top of a standard PAL display; WAIT h-pos $07 changes the colour at the start of the line, before the visible area. Lines past 255 get the WAIT $FF,$DF that lets the copper’s 8-bit vertical position wrap. For AGA each change writes the high nibbles, sets the LOCT bit in BPLCON3, and writes the low nibbles. Raster bars end with a return to the background colour.

  • C: UCopList — a function that builds the same gradient with CINIT, CWAIT, CMOVE and CEND and attaches it to an Intuition screen’s ViewPort, the system-friendly way. Line 0 is the top of the screen.

  • Colour table — one word per line as dc.w and a C array. On the ST and STE this is the table a Timer B (HBL) interrupt reads, and a minimal Timer B handler is included. STE words use its odd bit order (the lowest bit of each 4-bit value sits in bit 3).

  • Palette ramp — the gradient spread over 2–256 palette entries, for colour cycling or shading tables.

Sharing

Share link copies a link that carries the whole design — mode, colour stops or bars, chip set, dithering, timing, and output format — packed in ?s=.

Runs entirely in your browser; nothing you type leaves this page.