PR: Add domain-range scale annotations.#1371
Merged
Conversation
2570a24 to
259f218
Compare
b6a12cd to
c8b5029
Compare
fef5e66 to
a788883
Compare
…r.lightness` and `colour.whiteness`definitions.
…d-based metadata system.
a788883 to
88b6835
Compare
…ference` function.
…ion providing 100x performance increase.
92cbd1e to
d6d982c
Compare
This file contains hidden or 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
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.
Summary
This PR adds domain-range scale annotations to most of our functions as a special form of lean metadata on parameters and return values:
They can then be retrieved with the new
colour.get_domain_range_scale_metadatadefinition:The most common cases have dedicated type aliases:
Domain1: 1,Domain10: 10,Domain100: 100,Domain360: 360,Domain100_100_360: (100, 100, 360),Range1: 1,Range10: 10,Range100: 100,Range360: 360,Range100_100_360: (100, 100, 360),Thus
XYZ_to_Labis effectivelyThe conversion graph is now able to input and output at the reference scale using the new
from_referenceandto_referenceparameters.I took that opportunity to simplify the docstring tables and cross-check them.
Preflight
Code Style and Quality
colour,colour.models.Documentation