We received many requests last year to add support for HEX color values. HEX color values are supported all around the world and this CheerLights API update will help new people join the CheerLights project.
CheerLights uses channel number 1417 on ThingSpeak to store the colors that people Tweet. ThingSpeak supports up to 8 fields, so now we are using field2 to store the color’s HEX value. For example, oldlace and warmwhite get stored in field2 as #FDF5E6.
CheerLights Last HEX Color Value
- http://api.thingspeak.com/channels/1417/field/2/last.json
- http://api.thingspeak.com/channels/1417/field/2/last.xml
- http://api.thingspeak.com/channels/1417/field/2/last.txt
We also support people tweeting the HEX colors. Just for fun…
For more information, read the CheerLights API documentation.
When tweeting a hex code, what word/name goes into the first field?
It will be the color name, so #FF0000 will go to field2 and “red” will go to field1 as normal.
If I tweet an hex code which doesn’t correspond to the hex of one of the standard colours, what happens? Will field1 get the name of the standard colour nearer to my hex code? Field2 will mantain the original posted hex code or will it also be ’rounded’ to the nearer standard?
Thanks.
Thanks for the cool ideas. Right now the API only supports the specific HEX values for the supported colors. I do like the idea of trying to intreupt the HEX code and find the closest color. Thanks!