grasshopper2 Rhinorhino3d.com
ComponentDisplay
Change Colour Space
00000000-9608-42de-a9b4-370714950abe
object preview

Translate a colour from its current space to a different one. In Grasshopper 2, colours are defined as coordinates in a predefined set of colour spaces, including sRGB, HSL and L*a*b*.

Reasons for switching spaces include exporting colours to other applications, or modifying aspects of colours not directly encoded in the original space, such as hue or luminance.

Note that some spatial conversions are lossy since the gamuts of various spaces are not identical.

Below is a list of all the colour spaces Grasshopper 2 supports. Note that theGH Icon space is not based on mathematical equations and is therefore not a viable target space for colour translations.

Value Name Info
0 Standard RGB Standard−RGB space, used in almost all digital contexts where people don't care deeply about colour. The sRGB space is intrinsically gamma−corrected, which makes it unsuitable for colour arithmetic.
1 Linear RGB Linear RGB space. The fundamental RGB basis space without intrinsic gamma−correction, which makes it suitable for arithmetic and for representing HDR colours.
2 HSL Commonly used hue−sat−lum space with a naïve luminance metric.
3 HSV Commonly used hue−sat−lum space with a naïve luminance metric. The 'V' stands for 'value'.
4 H*SP Grasshopper specific hue−sat−lum space with an improved hue distribution and an advanced luminance metric. The 'P' stands for 'perceived luminance'.
10 CMY Standard cyan−magenta−yellow subtractive space. It is defined as the inverse of the sRGB space.
11 CMYK Standard cyan−magenta−yellow−key subtractive space.
20 CIE−L*a*b* A space encoding the luminance and the primary oppositions of red−green and blue−yellow of a colour.
21 CIE−XYZ Generalisation of the linear−RGB space which captures the entire human−visible range in its gamut. The Cie−XYZ model uses imaginary primaries called xarvine, yimber, and zorn.
22 CIE−Yxy Linear transformation of the XYZ space which encodes the luminance using only the 'Y' channel.
23 Oklab Perceptual space designed for the sRGB gamut, in which equal steps in lightness, chroma and hue look equally large. Colour arithmetic such as darkening, saturating and mixing behaves predictably here.
1000 GH Icon A non−mathematical space for encoding contextual colours in Grasshopper icons.
1
2
3
4
Example file AdjustSpace.ghz.Interactive in Grasshopper 2
Modify the space of a colour while retaining the perceptual qualities as well as possible. Some spatial conversions are lossy since the gamuts of various spaces are not identical.