## Context GPUI API change only: - added `.alpha(a: f32)` method to `RGBA` - added `.opacity(factor: f32)` method to `RGBA` - added documentation for both new methods - added test coverage for both methods These implementations already exist for the `HSLA` struct and were missing for `RGBA`. > [!NOTE] > In my opinion, a trait implementation could be beneficial here. Let me know what you think about that idea before I end up making unwanted changes. ## How to Review Just added the new methods, including documentation and test coverage. ## Self-Review Checklist <!-- Check before requesting review: --> - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - Added `gpui::Rgba::alpha` and `gpui::Rgba::opacity` methods for setting and scaling a color's alpha channel, matching the existing `gpui::Hsla` API --------- Co-authored-by: dino <dinojoaocosta@gmail.com>
2 files changedLine totals unavailable