Linear and radial gradients for container backgrounds and 2D paths
Raw Developer Origin & Technical Request
GitHub Issue
Dec 6, 2026
### What you are building
Desktop applications, charts, color pickers, and polished surfaces that need smooth linear or radial color transitions — both as container backgrounds (cards, headers, hero banners, subtle surface fades, progress tracks) and on canvas shapes/vector paths (area chart fills under curves, gauges, custom sliders, spectra).
Gradients are on [`docs/roadmap.md`](github.com/DEEIX-AI/cpui/blo... ("gradients") and follow up on #146 (which landed 2D `Path`, `FillRule`, `StrokeStyle`, and `PathList`), per @chenyme's note in #146:
> "Gradients would come next, also for container backgrounds... Your premultiplied gradient interpolation is a good foundation for that."
This issue sketches a minimal, zero-bloat design covering both container backgrounds and `Painter`/`Frame` paths so we can align on the API before writing code.
### How it might look in code
```rust
// Reusable value type (borrows a slice of stops — zero allocation on steady frames)
#[derive(Debug, Clone, Copy, PartialEq)]
pub struct ColorStop {
/// Position along the gradient, clamped to `0.0..=1.0`.
pub offset: f32,
pub color: Color,
}
#[derive(Debug, Clone, Copy, PartialEq)]
pub enum Gradient
Developer Debate & Comments
No active discussions extracted for this entry yet.
Adjacent Repository Pain Points
Other highly discussed features and pain points extracted from DEEIX-AI/cpui.
Frequently Asked Questions
Market intelligence mapped to Linear and radial gradients for container backgrounds and 2D paths.
What problem does Linear and radial gradients for container backgrounds and 2D paths solve?
What are the foundational technologies related to Linear and radial gradients for container backgrounds and 2D paths?
Engagement Signals
Cross-Market Term Frequency
Counts stored text matches for foundational terms like ColorStop and premultiplied gradient interpolation in analysed public discussions. These counts do not measure adoption.
Stored text matches, not adoption or market-share measurements.
- ColorStop: 1 records
- premultiplied gradient interpolation: 1 records
- Painter/Frame paths: 1 records
- zero allocation on steady frames: 1 records
SaaS Metrics