Utilities#
Callback Management#
colour
colour.utilities
|
Define a callback. |
A mixin providing support for callbacks. |
Common#
colour
|
Define context manager and decorator temporarily setting Colour domain-range scale. |
Return the current Colour domain-range scale. |
|
|
Set the current Colour domain-range scale. |
colour.utilities
A registry for mapping-based caches. |
A registry for mapping-based caches. |
|
|
Decorate a function to handle Numpy errors. |
|
Wrap given function wrapper. |
|
Wrap given function wrapper. |
|
Wrap given function wrapper. |
|
Wrap given function wrapper. |
|
Decorate a function to ignore Python warnings. |
|
Provide the assert statement functionality without being disabled by optimised Python execution. |
|
Return a batch generator from given sequence. |
Define a context manager and decorator to temporarily disabling Colour multiprocessing state. |
|
|
Define a context manager providing a multiprocessing pool. |
|
Return whether ctlrender is installed and available. |
|
Return whether Graphviz is installed and available. |
|
Return whether Matplotlib is installed and available. |
|
Return whether NetworkX is installed and available. |
|
Return whether OpenColorIO is installed and available. |
|
Return whether OpenImageIO is installed and available. |
|
Return whether Pandas is installed and available. |
|
Return whether tqdm is installed and available. |
|
Return whether Trimesh is installed and available. |
|
Return whether xxhash is installed and available. |
|
Decorate a function to check whether various ancillary package requirements are satisfied. |
|
Return whether given variable \(a\) is iterable. |
|
Return whether given variable \(a\) is a |
|
Return whether given variable \(a\) is a |
|
Return whether given variable \(a\) is an |
|
Return whether given element type is present in given mapping types. |
|
Filter keyword arguments incompatible with the given function signature. |
|
Filter given mapping with given names. |
|
Return the first item of given iterable. |
|
Copy a definition using the same code, globals, defaults, closure, and name. |
|
Validate whether given method exists in the given valid methods and returns the method lower cased. |
|
Handle optional argument value by providing a default value. |
|
Generate a SEO friendly and human-readable slug from given object. |
|
Generate an integer digest for given argument using xxhash if available or falling back to |
Array#
colour.utilities
A mixin providing fields introspection for the |
|
A mixin providing iteration capabilities over the |
|
A mixin providing conversion methods for |
|
A mixin providing mathematical operations for |
|
Convert given variable \(a\) to |
|
Attempt to convert given variable \(a\) to |
|
Attempt to convert given variable \(a\) to |
|
Convert given variable \(a\) to |
|
Convert given variable \(a\) to |
|
Convert given \(a\) variable to |
|
Convert given \(a\) variable to |
|
Set Colour default |
|
Set Colour default |
|
Scale given array \(a\) to domain '1'. |
|
Scale given array \(a\) to domain '10', used by Munsell Renotation System. |
|
Scale given array \(a\) to domain '100'. |
|
Scale given array \(a\) to degrees domain. |
|
Scale given array \(a\) to int domain. |
|
Scale given array \(a\) from range '1'. |
|
Scale given array \(a\) from range '10', used by Munsell Renotation System. |
|
Scale given array \(a\) from range '100'. |
|
Scale given array \(a\) from degrees range. |
|
Scale given array \(a\) from int range. |
Return whether Colour |
|
|
Set Colour |
|
Define a context manager and decorator temporarily setting Colour |
|
Return a |
|
Return the array \(a\) closest element indexes to the reference array \(b\) elements. |
|
Return the closest array \(a\) elements to the reference array \(b\) elements. |
|
Return the interval size of given distribution. |
|
Return whether given distribution is uniform. |
|
Return whether given array \(a\) contains only NaN values. |
|
Return whether each element of the array \(a\) is also present in the array \(b\) within given tolerance. |
|
Stack given array of arrays \(a\) along the last axis (tail) to produce a stacked array. |
|
Split given stacked array \(a\) along the last axis (tail) to produce an array of arrays. |
Return the rows of given array \(a\) as diagonal matrices. |
|
|
Orient given array \(a\) according to given orientation. |
|
Return the centroid indexes of given array \(a\). |
|
Fill given array \(a\) NaN values according to given method. |
Define a context manager setting given array \(a\) writeable to operate one and then read-only. |
|
|
Wrap |
|
Wrap |
|
Wrap |
|
Reduce the dimension of array \(a\) by one, by using an array of indexes to pick elements off the last axis. |
|
Format given array \(a\) as a row. |
Metrics#
colour.utilities
|
Compute the mean squared error (MSE) or mean squared deviation (MSD) between given variables \(a\) and \(b\). |
|
Compute the peak signal-to-noise ratio (PSNR) between given variables \(a\) and \(b\). |
Data Structures#
colour.utilities
|
Implement a delimiter and case-insensitive |
|
Implement a lazy delimiter and case-insensitive |
Extend |
|
|
Represent a basic node supporting the creation of basic node trees. |
|
Define a |
Verbose#
colour.utilities
|
Print a message inside a box. |
|
Alternative |
|
Issue a warning. |
|
Filter Colour and also optionally overall Python warnings. |
|
Define a context manager filtering Colour and also optionally overall Python warnings. |
|
Define a context manager implementing context changes to Numpy print behaviour. |
|
Describe Colour running environment, i.e. interpreter, runtime and development packages. |
|
Return a formatted string representation of the given object. |
|
Return an (almost) evaluable string representation of the given object. |
Ancillary Objects
colour.utilities
Define the base class of Colour warnings. |
|
Define the base class of Colour usage warnings. |
|
Define the base class of Colour runtime warnings. |