Skip to content

Try to handle egui color changes for old serialized session files#82

Merged
MichaelGrupp merged 3 commits intomasterfrom
color-conv-crap
Jul 25, 2025
Merged

Try to handle egui color changes for old serialized session files#82
MichaelGrupp merged 3 commits intomasterfrom
color-conv-crap

Conversation

@MichaelGrupp
Copy link
Owner

Without any conversion, an old saved value appears as a completely different color because it's assumed to be a gamma-premultiplied value (which it wasn't when serialized with egui < 0.32). This then lead e.g. the color picker to do wrong conversions and mess up the tint color.

We now check if the session was written with the latest or an old version and fix the misinterpreted color values if needed.

Note that while the values are correct after conversion, the image can still appear darker due to the blending changes in egui.

Relates to: emilk/egui#5824
Relates to: emilk/egui#7311

Without any conversion, an old saved value appears as a completely
different color because it's assumed to be a gamma-premultiplied
value (which it wasn't when serialized with egui < 0.32).
This then lead e.g. the color picker to do wrong conversions and
mess up the tint color.

We now check if the session was written with the latest or an old
version and fix the misinterpreted color values if needed.

Note that while the values are correct after conversion, the image
can still appear darker due to the blending changes in egui.

Relates to: emilk/egui#5824
Relates to: emilk/egui#7311
@MichaelGrupp MichaelGrupp merged commit 9ec8a05 into master Jul 25, 2025
4 checks passed
@MichaelGrupp MichaelGrupp deleted the color-conv-crap branch July 30, 2025 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant