charmbracelet / charmbracelet/bubbles
Non-24bit color support for charmbracelet/bubbles/progress
- Dominant language
- Go
- Stars
- 8.9k
- Forks
- 457
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 5
Description
`progress` currently has the option to define a custom gradient using `WithGradient`, which accepts two colors as strings. These are then [passed to `colorful.Hex`](https://github.com/charmbracelet/bubbles/blob/master/progress/progress.go#L332-L333) – which (perhaps obviously) doesn’t accept ANSI colors. Thus, creating ANSI gradients (for example, from `5` to `13` , regular to bright magenta) isn’t supported and the bar will fall back to a black fill.
On the other hand, passing ANSI colors to `WithSolidFill` works perfectly, as it is not run through `colorful.Hex` before rendering.
`go-colorful`, the library used to generate the gradient for `progress`, does not currently work with ANSI colors.
Contributor guide
Assessment
This issue has not been assessed yet.