Add completed color test in RGB and HSB modes

This commit is contained in:
Lev
2021-07-27 23:21:31 -05:00
parent 7a584896c9
commit cf65b0aa96
3 changed files with 56 additions and 0 deletions

View File

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script src="p5.min.js"></script>
<script src="sketch.js"></script>
</body>
</html>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,39 @@
function setup() {
createCanvas(1000, 500);
colorMode(RGB);
for(let i=0; i<255; i++)
{
for(let j=0; j<255; j++)
{
stroke(i, j, 0);
point(i, j);
}
}
colorMode(HSB);
translate(255, 0);
for(let x=0; x<360; x++)
{
for(let y=0; y<100; y++)
{
stroke(x, y, 100);
point(x, y);
}
}
translate(0, 155);
for(let x=0; x<360; x++)
{
for(let y=0; y<100; y++)
{
stroke(x, 100, y);
point(x, y);
}
}
noLoop();
}
function draw() {
}