-
-
Notifications
You must be signed in to change notification settings - Fork 376
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
feat(style): add conversions from the palette crate colors #1172
Conversation
This is behind the "palette" feature flag. ```rust use palette::{LinSrgb, Srgb}; use ratatui::style::Color; let color = Color::from(Srgb::new(1.0f32, 0.0, 0.0)); let color = Color::from(LinSrgb::new(1.0f32, 0.0, 0.0)); ```
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1172 +/- ##
=======================================
- Coverage 94.2% 94.2% -0.1%
=======================================
Files 60 60
Lines 14523 14521 -2
=======================================
- Hits 13684 13682 -2
Misses 839 839 ☔ View full report in Codecov by Sentry. |
Given that the terminals are reexported, should this be reexported too (when the feature flag is given)? |
There's no public code to export - just trait impls. |
|
Ah, gotcha. I'd expect that the only people wanting to turn this on are probably people that are specifically using palette already. Also we have a palette module already (so this could easily cause confusion). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I saw someone using palette
colors in one of the videos before. So this will definitely be useful!
This is behind the "palette" feature flag.