Created
January 16, 2018 20:20
-
-
Save jacobp100/00af55bdd7b7e7c3dd4cde6cd8d3b0b5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const colors = require('css-color-list')() | |
// Returns an observable that emits a color every 10ms. | |
// Stops when we've gone through every color. | |
const getColorsObservable = () => | |
Rx.Observable.interval(10) | |
.map(i => colors[i]) | |
.takeWhile(color => color != null) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment