Skip to content

Color::invert swaps channels incorrectly #3304

@dev-chee

Description

@dev-chee

What happened?

Color::invert currently computes:

r = 1.0 - r
b = 1.0 - g
g = 1.0 - b

This cross-dependency causes incorrect inversion.

Expected behavior

Each RGB channel should invert independently:

r = 1.0 - r
g = 1.0 - g
b = 1.0 - b

Scope

Minimal fix in color.rs only.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions