danparsons / QuickHue

OS X menu bar utility for controlling the Philips Hue lighting system
MIT License
203 stars 27 forks source link

Feature request: read color data from screen and set bulbs to match #9

Open danparsons opened 10 years ago

danparsons commented 10 years ago

Sent to me via email from jhrodes88@gmail.com:

I want to use something to intertwine my Plex home media server with my Philips Hue bulbs. Something needs to grab color information (either from Plex or just my display) and translate it to something that the Philips Hue can understand.

It looks like you have the second part already finished nicely, but the first part is a bit tricky. What do you think about using something like NSColorSpace to grab that color information from the display while you are watching a movie or playing a game.

laranea commented 9 years ago

Just do a system(screencapture) every x seconds and use the python library colorthief to retrieve the color pallette and then set your hue lights.

laranea commented 9 years ago

http://lokeshdhakar.com/projects/color-thief/