Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alacritty incorrect default text color #507

Closed
Xyhlon opened this issue Dec 26, 2021 · 5 comments
Closed

Alacritty incorrect default text color #507

Xyhlon opened this issue Dec 26, 2021 · 5 comments
Labels

Comments

@Xyhlon
Copy link

Xyhlon commented Dec 26, 2021

While using Lazygit I stumbled upon the problem that while using alacritty the text color in the change view was dark on dark and that the text color was fetched using tcell.ColorDefault(see here ).Thus I deduced that something is parsing the default text color from alacritty incorrectly, hence I am writing this bug report. For more details see the lazygit issue.
Could you please fix this.
Here is the colorscheme that I am using.
alacritty.yml
`schemes:

Doom One

doom-one: &doom-one
primary:
background: '#282c34'
foreground: '#bbc2cf' # However tcell should this setting for the default color
cursor:
text: CellBackground
cursor: '#528bff'
selection:
text: CellForeground
background: '#3e4451'
normal:
# black: '#1c1f24' # This .
black: '#ffffff' # It takes this color as tcell.ColorDefault
red: '#ff6c6b'
green: '#98be65'
yellow: '#da8548'
blue: '#51afef'
magenta: '#c678dd'
cyan: '#5699af'
white: '#202328'
bright:
black: '#5b6268'
red: '#da8548'
green: '#4db5bd'
yellow: '#ecbe7b'
blue: '#3071db'
magenta: '#a9a1e1'
cyan: '#46d9ff'
white: '#dfdfdf'
`

@Xyhlon Xyhlon changed the title Alacritty incorrect default Alacritty incorrect default text color Dec 26, 2021
@gdamore
Copy link
Owner

gdamore commented Apr 2, 2022

I would need to see how these colors are being sent to the terminal.

In modern tcell, the colors for RGB need to be specified by creating them using the function NewRGBColor() or NewHexColor(). Otherwise they wind up getting set to use whatever the defaults are for the terminal (basically honoring the terminal's 256 color palette).

If you have more specific example code that you think produces incorrect results I'm happy to look.

@gdamore
Copy link
Owner

gdamore commented Apr 3, 2022

Also can you please retest with current master -- bug #509 had a style/color bug that I just fixed. It might have been related.

@tobiassjosten
Copy link
Contributor

I'm hit with what I believe is this same bug. Using SetContent() seems to change the default style and Clear() then colors the whole screen that background color. Sync() resets it, as you mentioned in #509, @gdamore, but 2.5.0 doesn't fix it for me.

Please let me know how I can help debug this.

@gdamore
Copy link
Owner

gdamore commented Apr 16, 2022

Clear() had a different problem, which is now addressed.

Can you retest? If you have a simple demonstration program that exhibits the incorrect behavior that would be helpful.

@tobiassjosten
Copy link
Contributor

Can you retest? If you have a simple demonstration program that exhibits the incorrect behavior that would be helpful.

2.5.1 fixed it for me. 👌 Thank you, @gdamore!

@gdamore gdamore closed this as completed Apr 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants