public static LightCommand SetColor(this LightCommand lightCommand, RGBColor color, string model = "LCT001") { if (lightCommand == null) { throw new ArgumentNullException(nameof(lightCommand)); } var point = HueColorConverter.RgbToXY(color, model); return(lightCommand.SetColor(point.x, point.y)); }
public static RGBColor ToRgb(this State state, string model = "LCT001") { return(HueColorConverter.RgbFromState(state, model)); }
public static string ToHex(this State state, string model = "LCT001") { return(HueColorConverter.HexFromState(state, model)); }
public static string ToHex(this Light light) { return(HueColorConverter.HexFromState(light.State, light.ModelId)); }