Visualization
Gradients
Apply bounded semantic color gradients to complete terminal cells.
The site build compiles the dedicated Ada component example, constructs Gradients through its public API, and exports that exact styled surface. Read the capture source.
When to use it
Use gradients to communicate progression, intensity, or grouping on high-color terminals while retaining a useful reduced-color result.
State and ownership
The Flyology_TUI.Components.Gradients package defines this component.
A fixed-capacity stop model validates the complete stop order before changing state. Rendering preserves glyphs, attributes, and complete wide spans.
- The caller owns the target surface and the bounded gradient stops.
- The gradient borrows its region and color application mode for one call.
Behavior
Gradients are presentation-only. Color profiles progressively reduce truecolor output to ANSI 256, ANSI 16, or monochrome.
Integration sequence
- Create the fixed-capacity gradient model and replace its strictly ordered color stops atomically.
- Apply the gradient to a caller-owned surface region with the selected direction, interpolation, and foreground or background mode.
- Place the modified surface in the current layout; terminal color-profile adaptation occurs during rendering.
See the linked package reference for its exact declarations and contracts.
Responsive and accessible behavior
- Use dimensions and regions from the current layout or presentation value.
- Retain a glyph, label, border, or text-attribute cue when the terminal reduces color.