Click or drag to resize

GH_GraphicsUtilForegroundColour Method

Calculates a suitable foreground color. If the background is lighter than 50%, the foreground will be darker, otherwise the foreground will be lighter.

Namespace:  Grasshopper.GUI
Assembly:  Grasshopper (in Grasshopper.dll)
Syntax
public static Color ForegroundColour(
	Color col,
	int contrast = 30
)

Parameters

col
Type: System.DrawingColor
Foreground colour that works well on the given background colour.
contrast (Optional)
Type: SystemInt32
Contrast amount (in 0~255 range)

Return Value

Type: Color
See Also