Skip to content

Add Color::as_lcha #7757

Closed
Closed
@LiamGallagher737

Description

@LiamGallagher737

Problem

Other color spaces have a as_xxx with returns a Color and a as_xxx_f32 that returns a [f32; 4], the lch color space only has a as_lch_f32 that returns a [f32; 4].

Solution

Add a new method, as_lcha, for bevy_render::Color for converting any Color type into a Color::Lcha variant.

Note

Alongside this it would also make sense to rename as_lch_f32 to as_lcha_f32 as it also returns the alpha, not really big enough for its own issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-RenderingDrawing game state to the screenC-UsabilityA targeted quality-of-life change that makes Bevy easier to useD-TrivialNice and easy! A great choice to get started with Bevy

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions