I have successfully managed to implement a random hue selector into my random character code, but another problem presents itself with this achievement. The random hue picker that I've made work in JavaScript doesn't affect the colour change that I want correctly. If you want to see the goal of what I want to achieve, you can see that here
I am unsure of why this strange application of hue rotation is occurring. The code that governs hue selection in my code is this:
var robothue = new Image();
var robothuenum=Math.floor(Math.random()*359)+1; //Randomiser selects a value between 1 and 360.
canvas.style.filter = 'hue-rotate(' + robothuenum + 'deg)'; //This line applies the hue filter mentioned above.
Link to the full code here, with necessary image files to function correctly, if you want to try it out for yourself and figure out how to fix the hue rotation so it lines up more with the example image: https://github.com/Briochewindows/Random-Colour-Character-Generator.git