forked from color-js/color.js
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Audit function parameter and return types (3/2) #1
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ensure that functions in the following modules have the correct types and ensure that all color types can be passed as parameters: - chromaticity - distance - get - getAll
Drop "backing off" on chroma and instead: - ray trace to cube surface and correct L & H - ray trace again to see if the point moved off the surface, and if so, reposition it back on the surface and correct L & H one more time. - We may now be undersaturated due to L & H correction, so extend the vector past the cube surface and find the intersection. This is our gamut mapped color, no clipping should be needed.
Ensure that functions in the following modules have the correct types and ensure that all color types can be passed as parameters: - chromaticity - distance - get - getAll
* Add edge seeker algorithm * add hue normalization
This is probably as far as we can take ray tracing. It was though that the last correction and clip could be omitted, but it is required to get the optimal deltas. This time confirmed with a script. Max deltas: ∆L = 0.011682128741787201 ∆h = -4.212684767726387 Previously, there was still a region (in yellow) that could exceed this. (before ∆L = 0.0011833203080477972 ∆h = -8.31632698148956).
@MysteryBlokHed I'd love your thoughts on these changes as well. |
* audit-types-1: Audit function parameter and return types (1/2)
Ensure that functions in the following modules have the correct types and ensure that all color types can be passed as parameters: - inGamut - luminance - set - setAll - space - toGamut
* main: Audit function parameter and return types (2/2) (#457) Always show delta display to help confirm it is in gamut (#458) Final clip is required in Ray tracing [apps/gamut-mapping] Add edge seeker algorithm (#448) Audit function parameter and return types (1/2) (#456) Rework raytracing limiting hue shift to no more than 3 degrees at worst
Replaced by color-js#461 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Follow-up suggestions based on color-js#457:
Color.set()
,Color.setAll()
, andColor.toGamut()
consistently returnColor
objects.getColor
forspace.from
andspace.to