outline_smart
Draw pixel art outlines using colours from a ramp, darkening where form turns from light and optionally leaving the lit side unoutlined.
Instructions
Outline a shape in colours drawn from its own ramp, not one flat colour.
`add_outline` paints a single colour all the way round, which reads as a sticker.
Pixel artists vary the outline: darker where the form turns away from the light,
and often dropped entirely on the lit side so the shape breathes.
Args:
ramp: Colours darkest first. Outline pixels come from here.
mode: "colormatched" takes each outline pixel from the adjacent interior colour
shifted `darken_steps` down the ramp. "selective" does the same but leaves
the lit side unoutlined, which needs `light_angle`. "single" uses the
darkest ramp entry all round, the classic look.
darken_steps: How many ramp steps below the neighbouring interior colour.
light_angle: Degrees, required for "selective". 135 is the usual key light.
tolerance: How close an interior pixel must be to a ramp entry to be used as
the source for its outline pixel.
layer: Target layer (default: top layer).
frame: Target frame, 1-based.
The outline is drawn outside the silhouette, into transparency, so it never eats
into the artwork.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Default: "colormatched". | colormatched |
| ramp | Yes | ||
| frame | No | Default: 1. | |
| layer | No | ||
| filename | Yes | ||
| tolerance | No | Default: 32.0. | |
| light_angle | No | ||
| darken_steps | No | Default: 2. |