0

The title might not make much sense. But I am starting to play with Philips Hue and it seems you can control them from a simple html page.

http://www.developers.meethue.com/documentation/getting-started

Anyway, what I am trying to program, is an applet running off an html page. That analyses the colours of the screen being displayed at the time and changes the bulbs to glow that colour.

The result would be the lights changing according to what i am doing on my computer at the time, whether i am watching a movie, or playing a game.

How do i read the colours of the screen from an html page? preferable using JavaScript if possible.

Dylan Kay
  • 398
  • 3
  • 10
  • You'll probably need some flash or java plugin to access any content not in the current browser window. Flash can absolutely take a screenshot but I didn't see anything quick on google to do what you need. – Stefan Kendall May 16 '15 at 12:51

1 Answers1

0

You could take a screenshot with JavaScript and then analyze the colors of that. You could probably use <canvas>. See for example this post:

Using HTML5/Canvas/JavaScript to take screenshots

http://html2canvas.hertzen.com/examples.html

Community
  • 1
  • 1
Christiaan
  • 2,637
  • 21
  • 26