C# Class Q42.HueApi.ColorConverters.Original.HueColorConverter

Used to convert colors between XY and RGB internal: Do not expose
Show file Open project: Q42/Q42.HueApi Class Usage Examples

Public Methods

Method Description
CalculateXY ( RGBColor color, string model ) : CGPoint
HexFromState ( State state ) : string

Returns hexvalue from Light State

HexFromState ( State state, string model ) : string

Returns hexvalue from Light State

XyFromColor ( int red, int green, int blue ) : CGPoint

Get XY from red,green,blue ints

Private Methods

Method Description
CheckPointInLampsReach ( CGPoint p ) : bool

Method to see if the given XY value is within the reach of the lamps.

CheckPointInLampsReach ( CGPoint p, List colorPoints ) : bool
ColorFromXY ( CGPoint xy, string model ) : RGBColor
ColorPointsForModel ( string ModelID ) : List
CrossProduct ( CGPoint p1, CGPoint p2 ) : float
GetClosestPointToPoint ( CGPoint A, CGPoint B, CGPoint P ) : CGPoint

Find the closest point on a line. This point will be within reach of the lamp.

GetClosestPointToPoints ( CGPoint A, CGPoint B, CGPoint P ) : CGPoint
GetDistanceBetweenTwoPoints ( CGPoint one, CGPoint two ) : float
HexFromXy ( double xNumber, double yNumber ) : string

Get the HEX color from an XY value

XyFromColor ( string red, string green, string blue ) : CGPoint

Get XY from red,green,blue strings / ints

Method Details

CalculateXY() public static method

public static CalculateXY ( RGBColor color, string model ) : CGPoint
color RGBColor
model string
return CGPoint

HexFromState() public static method

Returns hexvalue from Light State
public static HexFromState ( State state ) : string
state State
return string

HexFromState() public static method

Returns hexvalue from Light State
public static HexFromState ( State state, string model ) : string
state State
model string
return string

XyFromColor() public static method

Get XY from red,green,blue ints
public static XyFromColor ( int red, int green, int blue ) : CGPoint
red int
green int
blue int
return CGPoint