bubbles icon indicating copy to clipboard operation
bubbles copied to clipboard

Non-24bit color support for charmbracelet/bubbles/progress

Open FIGBERT opened this issue 2 years ago • 0 comments

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 – 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.

FIGBERT avatar Apr 18 '22 06:04 FIGBERT