philips-hue

PHP - How to convert RGB color to CIE 1931 color specification

爷,独闯天下 提交于 2019-12-04 20:08:44
I am creating my own PHP based application where i want to change RGB color into xy format of CIE 1931. How can i convert my RGB color specs to the CIE color space? Philipp First calculate X, Y and Z with the transform matrix and then normalize the result X = 0.4124*R + 0.3576*G + 0.1805*B Y = 0.2126*R + 0.7152*G + 0.0722*B Z = 0.0193*R + 0.1192*G + 0.9505*B Normalize: x = X / (X + Y + Z) y = Y / (X + Y + Z) Here is my Javascript version. It should help you enough ;) /** * Convert RGB to XY */ function RGBtoXY(red,green,blue){ red = (red > 0.04045) ? Math.pow((red + 0.055) / (1.0 + 0.055), 2.4

iOS SDK Hue Philips with Swift

偶尔善良 提交于 2019-12-04 12:57:38
I tried to import iOS SDK in Objective C for Hue. I followed instructions here : https://github.com/PhilipsHue/PhilipsHueSDK-iOS-OSX I added the HueSDK_iOS.framework to my project, I added all Lumberjack files and I created the .h with the import line. After, I used in my code : var phHueSdk : PHHueSDK = PHHueSDK() var searching : PHBridgeSearching = PHBridgeSearching() I have this errors : Undefined symbols for architecture armv7k: "_OBJC_CLASS_$_PHHueSDK", referenced from: type metadata accessor for __ObjC.PHHueSDK in InterfaceController.o "_OBJC_CLASS_$_PHBridgeSearching", referenced from:

Where do Xcode Bots put their results, so I can parse them?

痴心易碎 提交于 2019-12-03 16:24:21
Our dev team has always used Jenkins for our iOS builds, and used Philips Hue lights to inform the team when the build is Building(Yellow), Successful(Green), Failed(Red). Now we have moved to Xcode CI and Bots , and I do not know when any unit tests fail. We don't even know if the build phase failed. On Xcode Bots CI you get this "bigscreen" feature: In Apple's "Manage and Monitor Bots from a Web Browser" Docs , you can see that it has all sorts of states that could key up a hue light. I really don't want to hack something up and parse an HTML page. Although fun, the work does not last long

RGB to Philips Hue (HSB)

一世执手 提交于 2019-11-29 12:30:59
问题 I'm making a musicplayer in Processing for an assignment for school. The Philips Hue lights will make some corresponding visual effects. I wanted to make the visuals kinda unique for each song. So I fetched the cover art (using LastFM API) of the playing track to get the most frequent color and use this as a base for creating the other colors. The Philips Hue has a different way of showing colors namely (HSB). So I converted it via Color.RGBtoHSB(); For ex. it gives me for R= 127, G=190, B