Skip to content

Lch color channels not matching expected semantics #8125

@IngmarBitter

Description

@IngmarBitter

Bevy version

Release 0.10.0 (#7919), and same issue on main branch as of f255872

[Optional] Relevant system information

AdapterInfo { name: "NVIDIA GeForce RTX 3060", vendor: 4318, device: 9476, device_type: DiscreteGpu, driver: "NVIDIA", driver_info: "528.02", backend: Vulkan }

You should also consider testing the examples of our upstream dependencies to help isolate any setup-specific issue:

What you did

Changed 2d_shapes example to this code: https://controlc.com/db7b150c
It creates a color swatch using the Lch color space.
Each row is the same lightness, each column the same hue.

What went wrong

The lightness channel was expected to produce black when set to 0.
It does so here: https://css.land/lch/
But in bevy it creates the bottom row, so black only when chroma is set to 0 as well.
.. but that means the row is not uniform lightness, since black is darker than any other color.
Similarly, at full lightness 1.0 I get white only if chroma is 0.0. And again, that's not the same lightness as the other colors in the same row.

image

See also https://discord.com/channels/691052431525675048/1086709490520432690

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