Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Colour - OECF - Check
import numpy as np
import colour
for c in sorted(colour.RGB_COLOURSPACES.values()):
samples = np.linspace(0, 1, 1000)
samples_tf = [c.transfer_function(sample) for sample in samples]
samples_itf = [c.inverse_transfer_function(sample) for sample in samples_tf]
np.testing.assert_almost_equal(samples, samples_itf, decimal=4)
print('Issue with "{0}"'.format(
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.