Drop in the ol colours

This commit is contained in:
Luke Murphy 2020-02-12 22:59:59 +01:00
parent 2fdc26122f
commit 7f6f0763c4
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC

View File

@ -55,6 +55,21 @@ var shapes = [];
var amplitude;
var duration;
// The background colour choices for the environment
var bgChoices [
color("#F6B2FF"),
color("#F58F6C"),
color("#C3EFDB"),
color("#CFE4D9"),
color("#ADCA95"),
color("#F58F6C"),
color("#A5F1F7"),
color("#FFC266"),
color("#FF66BB"),
color("#F6B2FF"),
];
var bgColour = bgChoices[floor(random(0, bgChoices.length - 1))];
function record() {
/**
* Start recording a sound.
@ -372,14 +387,37 @@ class GeneratedShape {
/**
* Choose a colour for the shape.
**/
// TODO: choose nicer colours
// TODO: Can we have gradient colours
// TODO: Can we have multiple colours
let colourChoices = [
color("red"),
color("blue"),
color("green"),
color("black")
color("#4F6EE8"),
color("#626788"),
color("#334171"),
color("#1529C2"),
color("#A17AA3"),
color("#606CEB"),
color("#8A77D5"),
color("#EB4913"),
color("#FC6012"),
color("#D94C14"),
color("#F08A60"),
color("#F8988F"),
color("#6E4F47"),
color("#93E35B"),
color("#DE3F16"),
color("#D1611F"),
color("#C22F0A"),
color("#C97814"),
color("#EDA714"),
color("#D5894A"),
color("#448F54"),
color("#61C26F"),
color("#ACE9B2"),
color("#CC25B6"),
color("#D695F0"),
color("#C5C2F0"),
color("#CC3D25"),
color("#A3614E"),
color("#F0DBA9"),
color("#7C4531")
];
let index = floor(random(0, colourChoices.length));
@ -500,7 +538,7 @@ function draw() {
/**
* The draw loop which is called x times a second where x is the frameRate.
**/
background("white");
background(backgroundColour);
blendMode(BLEND);
smooth();
noStroke();