Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restrict correction algorithm to produce sane results in extreme cases #436

Merged
merged 1 commit into from
Sep 15, 2024

Conversation

facelessuser
Copy link
Owner

When using ray trace and the adaptive lightness approach, Luv and its cylindrical counter part can produce chroma reduction curves that stress the algorithm in the dark blue region. This can yield yellows which make no sense.

Add a restriction in the correction code that projects the color onto the chroma reduction vector in the Lab model to restrict extreme results, outside the range of the vector, which can create colors outside the color space's ability to convert the color causing massive hue shifts.

Colors will still not be accurate, but they will be much closer to then intended target and be a more sane representation.

@gir-bot gir-bot added S: needs-review Needs to be reviewed and/or approved. C: docs Related to documentation. C: infrastructure Related to project infrastructure. C: source Related to source code. labels Sep 14, 2024
When using ray trace and the adaptive lightness approach, Luv and its
cylindrical counter part can produce chroma reduction curves that stress
the algorithm in the dark blue region. This can yield yellows which make
no sense.

Add a restriction in the correction code that projects the color onto
the chroma reduction vector in the Lab model to restrict extreme
results, outside the range of the vector, which can create colors
outside the color space's ability to convert the color causing massive
hue shifts.

Colors will still not be accurate, but they will be much closer to
then intended target and be a more sane representation.
@facelessuser facelessuser force-pushed the enhance/adaptive-improve branch from 4cfb11b to 8bffe11 Compare September 15, 2024 04:12
@gir-bot gir-bot added the C: tests Related to testing. label Sep 15, 2024
@facelessuser
Copy link
Owner Author

@gir-bot lgtm

@gir-bot gir-bot added S: approved The pull request is ready to be merged. and removed S: needs-review Needs to be reviewed and/or approved. labels Sep 15, 2024
@facelessuser facelessuser merged commit 66c4557 into main Sep 15, 2024
18 checks passed
@facelessuser facelessuser deleted the enhance/adaptive-improve branch September 15, 2024 04:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: docs Related to documentation. C: infrastructure Related to project infrastructure. C: source Related to source code. C: tests Related to testing. S: approved The pull request is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants