diff --git a/src/js/HuesCore.js b/src/js/HuesCore.js index daffb18..679fe93 100644 --- a/src/js/HuesCore.js +++ b/src/js/HuesCore.js @@ -690,7 +690,7 @@ HuesCore.prototype.previousImage = function() { }; HuesCore.prototype.randomColourIndex = function() { - let index=Math.floor((Math.random() * 64)); + let index=Math.floor((Math.random() * this.colours.length)); if (index == this.colourIndex) { return this.randomColourIndex(); }