psychopy.tools.colorspacetools.rgb2hsv

psychopy.tools.colorspacetools.rgb2hsv(rgb)[source]

Convert values from linear RGB to HSV colorspace.

Parameters:

rgb (array_like) – 1-, 2-, 3-D vector of RGB coordinates to convert. The last dimension should be length-3 in all cases, specifying a single coordinate.

Returns:

HSV values with the same shape as the input.

Return type:

ndarray


Back to top