Convert sRGB to linear RGB for text in iced_wgpu
This commit is contained in:
parent
c68edb3278
commit
bb27982009
1 changed files with 8 additions and 2 deletions
|
|
@ -67,8 +67,14 @@ impl Pipeline {
|
|||
section.content,
|
||||
glyphon::Attrs::new()
|
||||
.color({
|
||||
let [r, g, b, a] = section.color.into_rgba8();
|
||||
glyphon::Color::rgba(r, g, b, a)
|
||||
let [r, g, b, a] = section.color.into_linear();
|
||||
|
||||
glyphon::Color::rgba(
|
||||
(r * 255.0) as u8,
|
||||
(g * 255.0) as u8,
|
||||
(b * 255.0) as u8,
|
||||
(a * 255.0) as u8,
|
||||
)
|
||||
})
|
||||
.family(match section.font {
|
||||
Font::Default => glyphon::Family::SansSerif,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue