bevy/crates/bevy_ui/src
ickshonpe 5ea0e4004f
HSL and HSV interpolation for UI gradients (#19992)
# Objective

Add interpolation in HSL and HSV colour spaces for UI gradients.

## Solution
Added new variants to `InterpolationColorSpace`: `Hsl`, `HslLong`,
`Hsv`, and `HsvLong`, along with mix functions to the `gradients` shader
for each of them.

#### Limitations
* Didn't include increasing and decreasing path support, it's not
essential and can be done in a follow up if someone feels like it.

* The colour conversions should really be performed before the colours
are sent to the shader but it would need more changes and performance is
good enough for now.

## Testing

```cargo run --example gradients```
2025-07-07 20:08:51 +00:00
..
experimental Switch ChildOf back to tuple struct (#18672) 2025-04-02 00:10:10 +00:00
layout Split bevy_camera out of bevy_render (#19949) 2025-07-04 23:31:16 +00:00
widget Move TextShadow to text widget module (#19579) 2025-06-29 17:37:04 +00:00
accessibility.rs Specialized UI transform (#16615) 2025-06-09 19:05:49 +00:00
focus.rs Split bevy_camera out of bevy_render (#19949) 2025-07-04 23:31:16 +00:00
geometry.rs Rename Position to UiPosition in bevy_ui (#19422) 2025-05-29 14:52:44 +00:00
gradients.rs HSL and HSV interpolation for UI gradients (#19992) 2025-07-07 20:08:51 +00:00
interaction_states.rs Core Checkbox (#19665) 2025-06-20 16:37:18 +00:00
lib.rs bevy_ui_render crate (#18703) 2025-07-03 23:36:35 +00:00
measurement.rs
picking_backend.rs Fix ui picking outside the viewport (#19744) 2025-06-30 22:46:56 +00:00
stack.rs Rename bevy_platform_support to bevy_platform (#18813) 2025-04-11 23:13:28 +00:00
ui_material.rs bevy_ui_render crate (#18703) 2025-07-03 23:36:35 +00:00
ui_node.rs bevy_ui_render crate (#18703) 2025-07-03 23:36:35 +00:00
ui_transform.rs Specialized UI transform (#16615) 2025-06-09 19:05:49 +00:00
update.rs Split bevy_camera out of bevy_render (#19949) 2025-07-04 23:31:16 +00:00