Skip to content

Commit

Permalink
update palette to 0.7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Uriopass committed Jan 30, 2024
1 parent 836a695 commit d78676f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crates/yakui-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ bitflags = "1.3.2"
glam = "0.24.2"
keyboard-types = { version = "0.6.2", default-features = false }
log = "0.4.17"
palette = "0.6.0"
palette = "0.7.4"
profiling = "1.0.6"
smallvec = "1.9.0"
thunderdome = "0.6.0"
Expand Down
4 changes: 1 addition & 3 deletions crates/yakui-core/src/geometry/color.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@ impl Color {
/// Create a new `Color` from a linear RGB color.
pub fn from_linear(value: Vec4) -> Self {
let linear = palette::LinSrgba::new(value.x, value.y, value.z, value.w);
let (r, g, b, a) = palette::Srgba::from_linear(linear)
.into_format::<u8, u8>()
.into_components();
let (r, g, b, a) = palette::Srgba::<u8>::from_linear(linear).into_components();

Self::rgba(r, g, b, a)
}
Expand Down

0 comments on commit d78676f

Please sign in to comment.