Skip to content

Instantly share code, notes, and snippets.

@meesern
Last active December 27, 2015 09:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save meesern/7305732 to your computer and use it in GitHub Desktop.
Save meesern/7305732 to your computer and use it in GitHub Desktop.
Smooth colour rgb
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.2/prototype.js"></script>
<script src="http://mbostock.github.com/d3/d3.v2.min.js"></script>
<!--<link rel="stylesheet" href="style.css"/>-->
</head>
<body>
</body>
<script src="smoothcolour.js"></script>
</html>
//Basic setup
function setup()
{
update();
//schedule_update();
}
var timer;
function schedule_update()
{
clearTimeout(timer);
timer=setTimeout("update()",500);
}
function update()
{
d3.select('body').style('background',"blue");
}
setup();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment