Skip to content

fix: correct luminance coefficients in cie() function#142

Open
godfengliang wants to merge 4 commits into
jwagner:mainfrom
godfengliang:fix-luminance-coefficients
Open

fix: correct luminance coefficients in cie() function#142
godfengliang wants to merge 4 commits into
jwagner:mainfrom
godfengliang:fix-luminance-coefficients

Conversation

@godfengliang

Copy link
Copy Markdown

Fixes #77

The luminance calculation in had two issues:

  1. Typo: The red channel coefficient was instead of the correct (per Rec. 709 / ITU-R BT.709)
  2. Channel swap: Red and blue channels were swapped in the multiplication

Before:

This weighted blue ~7x higher than it should.

After:

Now correctly uses Rec. 709 coefficients: .

Reference: https://en.wikipedia.org/wiki/Rec._709

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Typoed coefficients in luminance calculation

1 participant