Skip to content

Converting Color from Hsla to Rgba (and vice versa) produce the wrong channel values #8838

@thmxv

Description

@thmxv

Bevy version

0.10.1

What you did

Using Color::hsl(0.0, 1.0, 1.0).as_rgba() returns white

What went wrong

I would expect to be red. The issue is the same for any hue.

Additional information

Converting a Color::Rgba to Color::Hsla and back yields the correct results, so I suspect the bug might be replicated simetricaly somehow.

Using Color::hsl(0.0, 1.0, 0.5).as_rgba() (note the 0.5 in place of the 1.0 for the lightness) produce the result I was expecting with a lightness of 1.0.

This seem to also affects the conversions to/from Color::RgbaLinear.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-RenderingDrawing game state to the screenC-BugAn unexpected or incorrect behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions