Skip to content

Instantly share code, notes, and snippets.

@goto-bus-stop
Created March 20, 2015 13:01
Show Gist options
  • Save goto-bus-stop/bc2cad1b9a515ec0ae17 to your computer and use it in GitHub Desktop.
Save goto-bus-stop/bc2cad1b9a515ec0ae17 to your computer and use it in GitHub Desktop.
Colours.
const cp = require('child_process')
let r = 0, g = 0.5, b = 0.4
setInterval(() => {
r += Math.random()
g += Math.random() * 2
b += Math.random() * 3
r %= 10, g %= 10, b %= 10
cp.spawn('xgamma', [ '-rgamma', (Math.round(r) / 10), '-bgamma', (Math.round(b) / 10), '-ggamma', (Math.round(g) / 10) ])
}, 100)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment