← back to roto on ba3a.dev

RampEditor

object RampEditor

Builds a Ramp from the colours the artist picked: sorts them dark to light by OKLab lightness, so the order they were clicked in does not matter, and says in plain words why a pick cannot be a ramp. Every failure is an IllegalArgumentException whose message is fit to show the artist.

Functions

Link copied to clipboard
fun build(name: String, picked: List<Int>, palette: Palette): Ramp

The ramp called name made of picked, darkest first.