Skip to content

Instantly share code, notes, and snippets.

@jonesfish
Last active October 15, 2015 12:31
Show Gist options
  • Select an option

  • Save jonesfish/8dde33cb12eb9c5317d7 to your computer and use it in GitHub Desktop.

Select an option

Save jonesfish/8dde33cb12eb9c5317d7 to your computer and use it in GitHub Desktop.

Revisions

  1. jonesfish revised this gist Oct 15, 2015. 1 changed file with 5 additions and 4 deletions.
    9 changes: 5 additions & 4 deletions rainbowbar.pde
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,12 @@
    size(400,300);

    colorMode(HSB);
    int spacing = 20;

    for (float x = 0; x<width; x+=spacing){
    float spacing = 20;

    for (float x=0; x < width; x+=spacing){
    float hue = x/width * 255;
    noStroke();
    fill(hue,255,255);
    rect(x, 0, spacing, height);
    fill(hue, 255, 255);
    rect(x,0,spacing,height);
    }
  2. jonesfish revised this gist Oct 15, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion rainbowbar.pde
    Original file line number Diff line number Diff line change
    @@ -7,5 +7,5 @@ for (float x = 0; x<width; x+=spacing){
    float hue = x/width * 255;
    noStroke();
    fill(hue,255,255);
    rect(x, 0, x+spacing, height);
    rect(x, 0, spacing, height);
    }
  3. jonesfish created this gist Oct 15, 2015.
    11 changes: 11 additions & 0 deletions rainbowbar.pde
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    size(400,300);

    colorMode(HSB);
    int spacing = 20;

    for (float x = 0; x<width; x+=spacing){
    float hue = x/width * 255;
    noStroke();
    fill(hue,255,255);
    rect(x, 0, x+spacing, height);
    }