color-js / color-js/apps

Convert utility is needlessly gamut mapping HDR colors in HDR colorspaces

Open
#11 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
31
Forks
5
Avg merge
2h 5m
Merged PRs (30d)
2

Description

For example [`color(display-p3 0 1.5 0)`](https://apps.colorjs.io/convert/?color=color(display-p3%200%201.5%200)&precision=4) is `color(rec2020 0.7082 1.528 0.1721)` and this ,correctly,gets gamut mapped because Rec BT.2020 is an SDR colorspace.

But `color(rec2100-linear 0.5039 2.389 0.0447)` should _not_ be gamut mapped, it is an HDR space where (1 1 1) is SDR white and HDR colors have one or more components above `1`.

I suspect this is because `rec2100-linear` is inheriting too much from the implementation of `rec2020-linear`.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the convert utility and reproduce the linked display-p3 and rec2100-linear examples. Inspect how rec2100-linear inherits from rec2020-linear and verify that HDR colors with components above 1 remain unmapped while the SDR Rec. 2020 example is still gamut mapped; done means both examples produce the stated behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.