Skip to content

Color range node gamut mapping #712

@jorenbroekema

Description

@jorenbroekema

Vattenfall reported that they got unexpected results when using the Color Range Node.
Their colors would make very big steps from one to another in terms of lightness, and my suspicion (to be triaged) is that it has to do with the fact that the generated color fall out of the spectrum for the given color space that they're being calculated in or converted to (e.g. oklch -> srgb).

Colorjs.io doesn't turn on gamut-mapping by default due to this being a lossy conversion, but we may have to turn that on in this color node to fix that.

Relevant links:
https://colorjs.io/docs/gamut-mapping
https://github.com/tokens-studio/graph-engine/blob/master/packages/graph-engine/src/nodes/color/lib/utils.ts#L18 I'm assuming it's related to when we convert.

Awaiting more info from user to reproduce

Metadata

Metadata

Assignees

No one assigned

    Labels

    InvestigateMore information or deep dive neededbugSomething isn't workinggraph-engine

    Type

    No type

    Projects

    Status

    📥 Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions