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

Add FAQ and Recipe for Terminal colors (was Demo looks strange) #660

Open
Smotrov opened this issue Jul 15, 2024 · 2 comments
Open

Add FAQ and Recipe for Terminal colors (was Demo looks strange) #660

Smotrov opened this issue Jul 15, 2024 · 2 comments
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@Smotrov
Copy link

Smotrov commented Jul 15, 2024

Description

Demo looks strange on MacOS with default font settings in terminal.

To Reproduce

Run following on MacOS cargo run --example=demo2 --features="crossterm widget-calendar"

and you'll see something like on the screenshot.

Expected behavior

Would be good if it will e displayed without glitches.

Screenshots

Знімок екрана 2024-07-15 о 14 31 53

Environment

MacOS terminal, zsh.

@kdheepak
Copy link
Contributor

Try the demo in iTerm2, Alacritty or Kitty on MacOS. The MacOS default Terminal.app does not support true colors:

https://github.com/ratatui-org/ratatui/blob/935a7187c273e0efc876d094d6247d50e28677a3/src/style/color.rs#L109-L111

duplicate of ratatui/ratatui#475

@joshka
Copy link
Member

joshka commented Jul 15, 2024

I'm going to move this over to the website repo and mark it as documentation needed.

  • Add a FAQ about RGB color support in terminals
  • Add a recipe for detecting support of RGB to avoid this problem

@joshka joshka reopened this Jul 15, 2024
@joshka joshka transferred this issue from ratatui/ratatui Jul 15, 2024
@joshka joshka added documentation Improvements or additions to documentation good first issue Good for newcomers labels Jul 15, 2024
@joshka joshka changed the title Demo looks strange Add FAQ and Recipe for Terminal colors (was Demo looks strange) Jul 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants