-
Notifications
You must be signed in to change notification settings - Fork 311
Closed
Description
Describe the bug
Hello, when running the programme below the Colorprofile is wrongly detected as ASCII. I need to setup it manually.
func main() {
var style = lipgloss.NewStyle().
Bold(true).
Foreground(lipgloss.Color("9")).
Background(lipgloss.Color("12")).
PaddingTop(2).
PaddingLeft(4).
Width(22)
// detected colorProfile is ASCII no color in the output
fmt.Print(style.Render("Hello, kitty"))
renderer := lipgloss.NewRenderer(os.Stdout, termenv.WithProfile(termenv.TrueColor))
// setting manually the Colors profile
renderer.SetColorProfile(termenv.TrueColor)
style2 := renderer.NewStyle().Foreground(lipgloss.Color("#FF0000")) // bright red
// Red color is displayed properly
fmt.Print(style2.Render("Hello, World!"))
}Setup
Please complete the following information along with version numbers, if applicable.
- OS macOS
- Shell zsh, nu Shell
- Terminal Emulator kitty, iterm
- Terminal Multiplexer tmux, none
- Locale en_US.UTF-8
To Reproduce
Steps to reproduce the behavior:
- Run go program in the description
Source Code
Please include source code if needed to reproduce the behavior.
Expected behavior
I expected to have the Colors without setting up anything.
Screenshots
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
