hyperion.ng
Static Public Member Functions | Public Attributes | List of all members
CiColor Struct Reference

A color point in the color space of the hue system. More...

#include <LedDevicePhilipsHue.h>

Static Public Member Functions

static CiColor rgbToCiColor (float red, float green, float blue, CiColorTriangle colorSpace)
 Converts an RGB color to the Hue xy color space and brightness. More...
 
static bool isPointInLampsReach (CiColor p, CiColorTriangle colorSpace)
 
static float crossProduct (CiColor p1, CiColor p2)
 
static CiColor getClosestPointToPoint (CiColor a, CiColor b, CiColor p)
 
static float getDistanceBetweenTwoPoints (CiColor p1, CiColor p2)
 

Public Attributes

float x
 X component.
 
float y
 Y component.
 
float bri
 The brightness.
 

Detailed Description

A color point in the color space of the hue system.

Member Function Documentation

§ crossProduct()

float CiColor::crossProduct ( CiColor  p1,
CiColor  p2 
)
static
Parameters
p1point one
p2point tow
Returns
the cross product between p1 and p2

§ getClosestPointToPoint()

CiColor CiColor::getClosestPointToPoint ( CiColor  a,
CiColor  b,
CiColor  p 
)
static
Parameters
areference point one
breference point two
pthe point to which the closest point is to be found
Returns
the closest color point of p to a and b

§ getDistanceBetweenTwoPoints()

float CiColor::getDistanceBetweenTwoPoints ( CiColor  p1,
CiColor  p2 
)
static
Parameters
p1point one
p2point tow
Returns
the distance between the two points

§ isPointInLampsReach()

bool CiColor::isPointInLampsReach ( CiColor  p,
CiColorTriangle  colorSpace 
)
static
Parameters
pthe color point to check
Returns
true if the color point is covered by the lamp color space

§ rgbToCiColor()

CiColor CiColor::rgbToCiColor ( float  red,
float  green,
float  blue,
CiColorTriangle  colorSpace 
)
static

Converts an RGB color to the Hue xy color space and brightness.

https://github.com/PhilipsHue/PhilipsHueSDK-iOS-OSX/blob/master/ApplicationDesignNotes/RGB%20to%20xy%20Color%20conversion.md

Parameters
redthe red component in [0, 1]
greenthe green component in [0, 1]
bluethe blue component in [0, 1]
Returns
color point

The documentation for this struct was generated from the following files: