Skip to content

Instantly share code, notes, and snippets.

@josecarlosqs
Last active November 25, 2015 05:45
Show Gist options
  • Save josecarlosqs/700ad3280ec98c850c20 to your computer and use it in GitHub Desktop.
Save josecarlosqs/700ad3280ec98c850c20 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Gamma de colores</title>
<style>
td{
padding:1px;
}
</style>
</head>
<body>
<table id="oli" cellspacing="0">
</table>
<script>
var tabla = document.getElementById("oli");
for(var i = 0; i < 256;i+=5){
var fila = tabla.insertRow();
for(var j = 0;j < 256; j+=5){
for(var k = 0; k < 256;k+=5){
var celda = fila.insertCell();
celda.style.backgroundColor = "rgb("+i+","+j+",100)";
}
}
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment