egui/crates/egui_demo_lib/tests/snapshots/demos
Emil Ernerfeldt 3f731ec794
Fix semi-transparent colors appearing too bright (#5824)
The bug was in `Color32::from_rgba_unmultiplied` and by extension
affects:

* `Color32::from_rgba_unmultiplied`
* `hex_color!`
* `HexColor`
* `ColorImage::from_rgba_unmultiplied`
* All images with transparency (png, webp, …)
* `Color32::from_white_alpha`

The bug caused translucent colors to appear too bright.

## More
Color is hard.

When I started out egui I thought "linear space is objectively better,
for everything!" and then I've been slowly walking that back for various
reasons:

* sRGB textures not available everywhere
* gamma-space is more _perceptually_ even, so it makes sense to use for
anti-aliasing
* other applications do everything in gamma space, so that's what people
expect (this PR)

Similarly, pre-multiplied alpha _makes sense_ for blending colors. It
also enables additive colors, which is nice. But it does complicate
things. Especially when mixed with sRGB/gamma (As @karhu [points
out](https://github.com/emilk/egui/pull/5824#issuecomment-2738099254)).

## Related
* Closes https://github.com/emilk/egui/issues/5751
* Closes https://github.com/emilk/egui/issues/5771 ? (probably; hard to
tell without a repro)
* But not https://github.com/emilk/egui/issues/5810

## TODO
* [x] I broke the RGBA u8 color picker. Fix it

---------

Co-authored-by: Andreas Reich <andreas@rerun.io>
2025-03-21 10:45:25 +01:00
..
Bézier Curve.png Fix semi-transparent colors appearing too bright (#5824) 2025-03-21 10:45:25 +01:00
Code Editor.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Code Example.png Fix sizing bug in `TextEdit::singleline` (#5640) 2025-03-03 09:22:01 +01:00
Context Menus.png Add `Popup` and `Tooltip`, unifying the previous behaviours (#5713) 2025-02-18 15:53:07 +01:00
Dancing Strings.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Drag and Drop.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Extra Viewport.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Font Book.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Frame.png Fix semi-transparent colors appearing too bright (#5824) 2025-03-21 10:45:25 +01:00
Highlighting.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Interactive Container.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Misc Demos.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Modals.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Multi Touch.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Painting.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Pan Zoom.png Change `Harness::run` to run until no more repaints are requested (#5580) 2025-01-07 08:33:44 +01:00
Panels.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Popups.png ⚠️ Improved menu based on `egui::Popup` (#5716) 2025-03-03 14:56:30 +01:00
Scene.png Fix semi-transparent colors appearing too bright (#5824) 2025-03-21 10:45:25 +01:00
Screenshot.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Scrolling.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Sliders.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Strip.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Table.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Text Layout.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
TextEdit.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Tooltips.png Add `Popup` and `Tooltip`, unifying the previous behaviours (#5713) 2025-02-18 15:53:07 +01:00
Undo Redo.png Fix minor glitch in rendering of selected windows (#5678) 2025-02-04 16:05:36 +01:00
Window Options.png Add `Ui::close` and `Response::should_close` (#5729) 2025-02-20 17:59:29 +01:00