Skip to content

Instantly share code, notes, and snippets.

@robinboehm
Created March 27, 2014 20:41
Show Gist options
  • Save robinboehm/9818157 to your computer and use it in GitHub Desktop.
Save robinboehm/9818157 to your computer and use it in GitHub Desktop.
ScreenCast-ColorPicker-Solved
<!DOCTYPE html>
<html ng-app>
<head>
<title></title>
</head>
<body ng-init="r=1;g=1;b=1;a=1">
<h1>ColorPicker</h1>
<input type="range" min="0" max="255" step="1" ng-model="r"/><br/>
<input type="range" min="0" max="255" step="1" ng-model="g"/><br/>
<input type="range" min="0" max="255" step="1" ng-model="b"/><br/>
<input type="range" min="0" max="1" step="0.01" ng-model="a"/><br/>
<div style="width: 300px;height: 300px;
background-color: rgba({{r}},{{g}},{{b}},{{a}})"></div>
<script src="bower_components/angular/angular.js"></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment