Skip to content

Color detection mechanism does not work if stdout is piped #662

Answered by hopefulTex
pomdtr asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, you can solve this by forcing a color profile with lipgloss.SetColorProfile(int).
There are 4 modes available, 0:TrueColor, 1:ANSI256, 2:ANSI, 3:Ascii.
This isn't a bug, moreover a precaution the termenv lib takes to avoid writing escape sequences when 'not' outputting to a TTY.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by bashbunni
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #655 on February 15, 2023 19:29.