Treehopper C# API
Color Class Reference

Public Member Functions

int ToArgb ()
 
float GetBrightness ()
 
float GetSaturation ()
 
float GetHue ()
 

Static Public Member Functions

static Color FromArgb (int alpha, Color baseColor)
 
static Color FromArgb (int argb)
 
static Color FromArgb (int red, int green, int blue)
 
static Color FromArgb (int alpha, int red, int green, int blue)
 
static Color FromHsl (float hue, float saturation, float luminance)
 Construct a color from HSL values More...
 
static bool operator== (Color left, Color right)
 Equality Operator More...
 
static bool operator!= (Color left, Color right)
 Inequality Operator More...
 

Properties

byte A [get]
 
byte R [get]
 
byte G [get]
 
byte B [get]
 

Member Function Documentation

◆ FromArgb() [1/4]

static Color FromArgb ( int  alpha,
Color  baseColor 
)
static

◆ FromArgb() [2/4]

static Color FromArgb ( int  argb)
static

◆ FromArgb() [3/4]

static Color FromArgb ( int  red,
int  green,
int  blue 
)
static

◆ FromArgb() [4/4]

static Color FromArgb ( int  alpha,
int  red,
int  green,
int  blue 
)
static

◆ FromHsl()

static Color FromHsl ( float  hue,
float  saturation,
float  luminance 
)
static

Construct a color from HSL values

Parameters
hueThe hue, in degrees (0-360 mod)
saturationThe saturation percentage, from 0 to 100
luminanceThe luminance percentage, from 0 to 100
Returns
A Color with the HSL values

◆ ToArgb()

int ToArgb ( )

◆ operator==()

static bool operator== ( Color  left,
Color  right 
)
static

Equality Operator

Compares two Color objects. The return value is based on the equivalence of the A,R,G,B properties of the two Colors.

◆ operator!=()

static bool operator!= ( Color  left,
Color  right 
)
static

Inequality Operator

Compares two Color objects. The return value is based on the equivalence of the A,R,G,B properties of the two colors.

◆ GetBrightness()

float GetBrightness ( )

◆ GetSaturation()

float GetSaturation ( )

◆ GetHue()

float GetHue ( )

Property Documentation

◆ A

byte A
get

◆ R

byte R
get

◆ G

byte G
get

◆ B

byte B
get

The documentation for this class was generated from the following file: