grasshopper2 Rhinorhino3d.com
TopicType Reference
X → Colour Conversions

This topic provides a reference table for all automatic type conversions to colour, sorted by merit.

Direct Conversions

This section lists all direct Direct conversions to the colour type. A direct conversion indicates a relation between very related types. Though note that even these conversions can fail due to out-of-bounds issues, or they may narrow due to reduction. Examples in this category include conversions from circles to curves, or from integers to numbers.

From Explanation
Colour (RGB) Converts RGB color to general color representation.

Plausible Conversions

This section lists all plausible Plausible conversions to the colour type. A plausible conversion indicates a non-straightforward, but still a reasonable conversion between two types sharing a salient quality, or where one is an obvious sub-type of the other. Any plausible conversion can also be achieved through the explicit use of standard components. Examples in this category include conversions from points to planes, or from boxes to rectangles.

From Explanation
angle Maps the angle to the hue channel of a color.
boolean Converts false to black, true to white.
complex number Maps complex argument to hue and modulus to saturation.
gradient Extracts the average color of the gradient.
number Maps the entire number line onto a black-to-white gradient.
vector Maps (X,Y,Z) components from the range [-1,+1] onto (R,G,B) channels from 0 to 1.

Strange Conversions

This section lists all strange Strange conversions to the colour type. A strange conversion indicates a peculiar, but occasionally sensible, translation between types. However, it is equally likely that the conversion was not intended and thus signals a mistake in the algorithm design, which is why this conversion level is the default for showing conversion warnings. Examples in this category include the conversion from decimal numbers to languages, or from views to meshes. Any strange conversion can also be achieved through the explicit use of standard components.

From Explanation
plane Maps the (X,Y,Z) components of the plane normal from the range [-1,+1] onto (R,G,B) channels from 0 to 1.

Weird Conversions

This section lists all weird Weird conversions to the colour type. A weird conversion indicates an exotic relationship between types, which is almost certainly unintended on the part of the user. However, very occasionally these conversions make sense and allow the user to avoid the use of several components to achieve the same result. No standard conversion currently falls into this category.

From Explanation
integer Converts zero to black and everything else to white.
integer (big) Converts zero to black and everything else to white.