Grasshopper API
GH_GraphicsUtilCreateColourIcon Method |
Create a colour swatch icon.
Namespace: Grasshopper.GUI
Assembly: Grasshopper (in Grasshopper.dll)

public static Bitmap CreateColourIcon( int width, int height, Color colour )
Public Shared Function CreateColourIcon ( width As Integer, height As Integer, colour As Color ) As Bitmap
Parameters
- width
- Type: SystemInt32
Width of icon. - height
- Type: SystemInt32
Height of icon. - colour
- Type: System.DrawingColor
Colour for swatch, if colour contains an alpha component, you should draw an alpha-grid behind the icon.
Return Value
Type: BitmapA bitmap with the requested icon colour.
