Skip to content

Commit

Permalink
fix: fix conversion of bones Color to egui::Color32. (#304)
Browse files Browse the repository at this point in the history
Uses sRGB conversion instead of linear conversion.

This fixes the display of UI colors specified in Jumpy style assets.
  • Loading branch information
zicklag committed Jan 12, 2024
1 parent e59db7c commit 06d5efc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion framework_crates/bones_framework/src/render/color.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,13 @@ impl From<Color> for egui::Color32 {
green,
blue,
alpha,
} => egui::Rgba::from_rgba_unmultiplied(red, green, blue, alpha).into(),
} => egui::Rgba::from_srgba_unmultiplied(
(red * 255.0) as u8,
(green * 255.0) as u8,
(blue * 255.0) as u8,
(alpha * 255.0) as u8,
)
.into(),
}
}
}
Expand Down

0 comments on commit 06d5efc

Please sign in to comment.