Utilities#
Callback Management#
colour
colour.utilities
|
Represent a named callback with its associated callable function. |
Provide callback support for attribute changes in classes. |
Common#
colour
|
Define a context manager and decorator to temporarily set the Colour domain-range scale. |
Return the current Colour domain-range scale. |
|
|
Extract domain-range scale metadata from function type hints. |
|
Set the current Colour domain-range scale. |
colour.utilities
Provide a registry for managing mapping-based caches. |
|
Provide the |
|
Generate batches from the specified sequence. |
Provide a registry for managing mapping-based caches. |
|
|
Define a context manager and decorator to temporarily set the Colour caching enabled state. |
|
Copy a definition using the same code, globals, defaults, closure, and name. |
Define a context manager and decorator to temporarily disable Colour multiprocessing state. |
|
|
Filter keyword arguments incompatible with the specified function signature. |
|
Filter the specified mapping with specified names. |
|
Return the first item from the specified iterable. |
|
Handle Numpy errors through function decoration. |
|
Wrap specified function wrapper. |
|
Decorate a function to ignore Python warnings. |
xxh3_64_intdigest |
|
Determine whether Colour caching is enabled. |
|
|
Determine whether the specified variable \(a\) is an |
|
Determine whether the specified variable \(a\) is iterable. |
|
Determine whether the specified variable \(a\) is a |
|
Determine whether the type of the specified element is present in the specified mapping types. |
|
Provide a context manager for a multiprocessing pool. |
|
Return the specified value or a default if the value is None. |
|
Wrap specified function wrapper. |
|
Wrap specified function wrapper. |
|
Set the Colour caching enabled state. |
|
Generate a SEO friendly and human-readable slug from the specified object. |
|
Compute the SHA-256 hash of given file. |
|
Validate whether the specified method exists in the specified valid methods and optionally return the method lower cased. |
|
Wrap specified function wrapper. |
Array#
colour.utilities
Provide mathematical operations for |
|
Provide conversion methods for |
|
Provide fields introspection for |
|
Provide iteration capabilities over |
|
Convert the specified variable \(a\) to |
|
Convert the specified variable \(a\) to |
|
Convert the specified variable \(a\) to |
|
Convert the specified variable \(a\) to |
|
Convert the specified variable \(a\) to |
|
Convert the specified variable \(a\) to |
|
Convert the specified variable \(a\) to |
|
Convert the specified variable \(a\) to |
|
Return the centroid indexes of the specified array \(a\). |
|
Return the closest array \(a\) elements to reference array \(b\) elements. |
|
Return the closest element indexes from array \(a\) to reference array \(b\) elements. |
|
Fill the NaN values in the specified array \(a\) using the specified method. |
|
Format the specified array \(a\) as a row. |
|
Scale the specified array \(a\) from range '1'. |
|
Scale the specified array \(a\) from range '10', used by the Munsell Renotation System. |
|
Scale the specified array \(a\) from range '100'. |
|
Scale the specified array \(a\) from degrees range. |
|
Scale the specified array \(a\) from integer range. |
|
Create an array of the specified value with the active dtype. |
|
Return whether the specified array \(a\) contains only NaN values. |
|
Determine whether each element of array \(a\) is present in array \(b\) within the specified tolerance. |
|
Reduce the dimension of array \(a\) by one, using an array of indexes to select elements from the last axis. |
|
Return the interval size of the specified distribution. |
Determine whether Colour |
|
|
Determine whether the specified distribution is uniform. |
|
Return a |
|
Define a context manager and decorator to temporarily set the Colour |
Define a context manager that temporarily sets the specified array \(a\) to writeable for operations, then restores it to read-only. |
|
|
Create an array of ones with the active dtype. |
|
Orient the specified array \(a\) using the specified orientation. |
Return the rows of the specified array \(a\) as diagonal matrices. |
|
|
Set the Colour default |
|
Set the Colour default |
|
Set the Colour |
|
Scale the specified array \(a\) to domain '1'. |
|
Scale the specified array \(a\) to domain '10', used by the Munsell Renotation System. |
|
Scale the specified array \(a\) to domain '100'. |
|
Scale the specified array \(a\) to degrees domain. |
|
Scale the specified array \(a\) to integer domain. |
|
Split the specified stacked array \(a\) along the last axis (tail) to produce an array of arrays. |
|
Stack the specified array of arrays \(a\) along the last axis (tail) to produce a stacked array. |
|
Create an array of zeros with the active dtype. |
Data Structures#
colour.utilities
|
Represent a delimiter and case-insensitive |
|
Represent a lazy delimiter and case-insensitive |
Represent a |
|
|
Represent a |
Network#
colour.utilities
|
Define a port object that serves as an input or output port (i.e., a pin) for a |
|
Define a node-graph for |
|
Define a node with support for input and output ports. |
|
Define a basic node supporting the creation of hierarchical node trees. |
Metrics#
colour.utilities
|
Compute the mean squared error (MSE) between the specified arrays \(a\) and \(b\). |
|
Compute the peak signal-to-noise ratio (PSNR) between the specified arrays \(a\) and \(b\). |
Requirements#
colour.utilities
|
Determine whether ctlrender is installed and available. |
|
Determine whether Imageio is installed and available. |
|
Determine whether Matplotlib is installed and available. |
|
Determine whether NetworkX is installed and available. |
|
Determine whether OpenColorIO is installed and available. |
|
Determine whether OpenImageIO is installed and available. |
|
Determine whether Pandas is installed and available. |
|
Determine whether Pydot is installed and available. |
|
Determine whether tqdm is installed and available. |
|
Determine whether Trimesh is installed and available. |
|
Determine whether xxhash is installed and available. |
|
Check whether specified ancillary package requirements are satisfied and decorate the function accordingly. |
Verbose#
colour.utilities
|
Convert the specified string to a boolean value. |
|
Describe the Colour runtime environment, including interpreter details and package versions. |
|
Filter Colour and optionally overall Python warnings. |
|
Print a message inside a formatted box. |
|
Generate an evaluable string representation of the specified object. |
|
Generate a formatted multi-line string representation of the specified object. |
|
Implement a context manager for temporarily modifying NumPy array print options. |
|
Display a warning message with enhanced formatting that enables traceback printing. |
Define a context manager and decorator to temporarily suppress standard output. |
|
|
Suppress Colour and optionally overall Python warnings within a context. |
|
Issue a warning. |
Ancillary Objects
colour.utilities
Define the base class for Colour runtime warnings. |
|
Define the base class for Colour usage warnings. |
|
Define the base class for Colour warnings. |
|
Provide logging capabilities through mixin inheritance. |