colour.OSA_UCS_to_XYZ#

colour.OSA_UCS_to_XYZ(Ljg: Annotated[_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], 100], optimisation_kwargs: dict | None = None) Annotated[ndarray[tuple[Any, ...], dtype[float16 | float32 | float64]], 100][source]#

Convert from OSA UCS colourspace to CIE XYZ tristimulus values under the CIE 1964 10 Degree Standard Observer.

The lightness axis, L, is typically in range [-9, 5] and centered around middle gray (Munsell N/6). The yellow-blue axis, j, is typically in range [-15, 15]. The red-green axis, g, is typically in range [-20, 15].

Parameters:
  • Ljg (Annotated[_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], 100]) – OSA UCS \(Ljg\) lightness, jaune (yellowness), and greenness.

  • optimisation_kwargs (dict | None) –

    Parameters for Newton iteration. Supported parameters:

    • iterations_maximum: Maximum number of iterations (default: 20).

    • tolerance: Convergence tolerance (default: 1e-10).

    • epsilon: Step size for numerical derivative (default: 1e-8).

Returns:

CIE XYZ tristimulus values under the CIE 1964 10 Degree Standard Observer.

Return type:

numpy.ndarray

Notes

Domain

Scale - Reference

Scale - 1

Ljg

100

1

Range

Scale - Reference

Scale - 1

XYZ

100

1

  • OSA UCS uses the CIE 1964 10 Degree Standard Observer.

  • This implementation uses the improved algorithm from [] which employs Cardano’s formula for solving the cubic equation and Newton’s method for the remaining nonlinear system.

References

[CTS13], [Mor03], []

Examples

>>> import numpy as np
>>> Ljg = np.array([-3.00499790, 2.99713697, -9.66784231])
>>> OSA_UCS_to_XYZ(Ljg)
array([ 20.654008...,  12.197225...,   5.1369520...])