Skip to content
Browse files

Change Colour Mode

Change to HSL from HSB as you can get HSL values from the browsers colour
pickers and are CSS/HTML compatable colour Schemes. HSB is purely a p5.js

Create an object to hold all the colors we're going to use in one place to
make them easier to read and use around the codebase. Great example of how
an objects key:value creates meaning for the programmer.
  • Loading branch information...
Jackbennett committed Jul 12, 2016
1 parent bfcc502 commit 1a34c19a9f9f0c021b9752ea6ea670bc767a16ec
Showing with 9 additions and 5 deletions.
  1. +9 −5 public/sketch-8.js
@@ -4,21 +4,25 @@ console.log('sketch-8')
var x = 100;
var y = 100;

var bg
var pallet = {}
var list = []

function setup() {
bg = color(20,90,90)
colorMode(HSB, 95)
// Colours
colorMode(HSL) // HSL is easier to use, get them with the browsers colour picker.
pallet.dark = color(23,22,27)
pallet.dust = color(58,78,80) = color(159,39,55)

createCanvas(512, 512);


var last = {'x': 0, 'y': 0}

function draw() {
fill(255, 0, 0);

if (keyIsDown(LEFT_ARROW)){

0 comments on commit 1a34c19

Please sign in to comment.
You can’t perform that action at this time.