Skip to content

Instantly share code, notes, and snippets.

@soncco
Created October 24, 2013 03:14
Show Gist options
  • Save soncco/7130735 to your computer and use it in GitHub Desktop.
Save soncco/7130735 to your computer and use it in GitHub Desktop.
Pequeño ejemplo de colores con RGB.
<!doctype html>
<html>
<head>
<style>
div {
width: 100px;
height: 100px;
float: left;
}
</style>
</head>
<body>
<script>
for(r = 0; r <= 255; r+= 30)
for(g = 0; g <= 255; g+= 30)
for(b = 0; b <= 255; b+= 30)
document.write('<div style="background: rgb(' + r + ',' + g + ', '+ b + ')"></div>');
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment