Skip to content

Instantly share code, notes, and snippets.

@mr23
Last active September 2, 2015 20:50
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 mr23/f50b395446ecbc1a25e9 to your computer and use it in GitHub Desktop.
Save mr23/f50b395446ecbc1a25e9 to your computer and use it in GitHub Desktop.
Inlet demo
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script>
</head>
<body>
<span id="answer" style="text-align:center;display:block;width:100%"></span>
<script>
// The inlet library provides the sliders and color picker for building-blocks
// https://github.com/enjalot/Inlet
// Click on the hex value or number below:
var color = "#00588e"
var theAnswer = 42;
d3.select("#answer").text(theAnswer)
.style({color: color, "font-size": "442px"})
var decimal = 46.5;
var tinyDecimal = 0.060928;
var noZero = .-36;
//You can also use hsl colors
var hsl = "hsl(133,100%,90%)";
d3.select("body").style("background-color", hsl);
// You can also use rgb colors
var rgb = "rgb(0,229,91)";
</script>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment