https://github.com/cheerlights/cheerlights-javascript
JavaScript client library for connecting to ThingSpeak ( https://thingspeak.com/ ) to get the latest color values for CheerLights ( https://cheerlights.com/ ).
https://github.com/cheerlights/cheerlights-javascript
cheerlights cheerlights-client iot javascript javascript-library
Last synced: over 1 year ago
JSON representation
JavaScript client library for connecting to ThingSpeak ( https://thingspeak.com/ ) to get the latest color values for CheerLights ( https://cheerlights.com/ ).
- Host: GitHub
- URL: https://github.com/cheerlights/cheerlights-javascript
- Owner: cheerlights
- License: mit
- Created: 2021-12-09T23:10:12.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-09-28T19:54:55.000Z (over 3 years ago)
- Last Synced: 2025-01-23T01:24:37.786Z (over 1 year ago)
- Topics: cheerlights, cheerlights-client, iot, javascript, javascript-library
- Language: JavaScript
- Homepage: https://cheerlights.com/cheerlights-javascript-client-library-released-at-github/
- Size: 7.81 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
cheerlights-javascript
=====================
JavaScript client library for connecting to ThingSpeak ( https://thingspeak.com/ ) to get the latest color values for CheerLights ( https://cheerlights.com/ ).
## Usage
Add library to webpage:
* Local
```
```
* CDN for v1.0.0
```
```
* CDN for Latest Release
```
```
Use getColor and set a callback:
```
CheerLights.getColor(callbackFunctionName);
```
## Property Values: color
* color.htmlName
* color.hexValue
## Color Values
| htmlName | hexValue |
| --- | ----------- |
| red | #FF0000 |
| green | #008000 |
| blue | #0000FF |
| cyan | #00FFFF |
| white | #FFFFFF |
| oldlace | #FDF5E6 |
| purple | #800080 |
| magenta | #FF00FF |
| yellow | #FFFF00 |
| orange | #FFA500 |
| pink | #FFC0CB |
## Examples
See the [examples folder](https://github.com/cheerlights/cheerlights-javascript/tree/master/examples) for fully-working examples using this library.