Click or drag to resize

GH_GraphicsUtilOffsetColour Method (Color, Int32, Int32, Int32)

Add a fixed value to all the channels in a colour.

Namespace:  Grasshopper.GUI
Assembly:  Grasshopper (in Grasshopper.dll)
Syntax
public static Color OffsetColour(
	Color col,
	int redShift,
	int greenShift,
	int blueShift
)

Parameters

col
Type: System.DrawingColor
The colour to mutate
redShift
Type: SystemInt32
Offset value for red channel (-255 ~ +255).
greenShift
Type: SystemInt32
Offset value for green channel (-255 ~ +255).
blueShift
Type: SystemInt32
Offset value for blue channel (-255 ~ +255).

Return Value

Type: Color
The offsetted colour.
Remarks
The alpha channel of the colour is not offset.
See Also