# -*- coding: utf-8 -*-
"""
Showcases *ICTCP* *colour encoding* computations.
"""

import numpy as np

import colour
from colour.utilities import message_box

message_box('"ICTCP" Colour Encoding Computations')

RGB = np.array([0.45620519, 0.03081071, 0.04091952])
message_box(('Converting from "ITU-R BT.2020" colourspace to "ICTCP" colour '
             'encoding given "RGB" values:\n'
             '\n\t{0}'.format(RGB)))
print(colour.RGB_to_ICTCP(RGB))

print('\n')

ICTCP = np.array([0.07351364, 0.00475253, 0.09351596])
message_box(('Converting from "ICTCP" colour encoding to "ITU-R BT.2020" '
             'colourspace given "ICTCP" values:\n'
             '\n\t{0}'.format(ICTCP)))
print(colour.ICTCP_to_RGB(ICTCP))

[((159, 210), 'colour.utilities.message_box', 'message_box', (['""""ICTCP" Colour Encoding Computations"""'], {}), '(\'"ICTCP" Colour Encoding Computations\')\n', (170, 210), False, 'from colour.utilities import message_box\n'), ((218, 264), 'numpy.array', 'np.array', (['[0.45620519, 0.03081071, 0.04091952]'], {}), '([0.45620519, 0.03081071, 0.04091952])\n', (226, 264), True, 'import numpy as np\n'), ((480, 526), 'numpy.array', 'np.array', (['[0.07351364, 0.00475253, 0.09351596]'], {}), '([0.07351364, 0.00475253, 0.09351596])\n', (488, 526), True, 'import numpy as np\n'), ((432, 456), 'colour.RGB_to_ICTCP', 'colour.RGB_to_ICTCP', (['RGB'], {}), '(RGB)\n', (451, 456), False, 'import colour\n'), ((698, 724), 'colour.ICTCP_to_RGB', 'colour.ICTCP_to_RGB', (['ICTCP'], {}), '(ICTCP)\n', (717, 724), False, 'import colour\n')]