Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

183
Views
How do I get Hue Rotate to only rotate the hue, and not affect saturation or luminosity?

I have successfully managed to implement a random hue selector into my random character code, but another problem presents itself with this acheivement. 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 occuring. 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

about 4 years ago · Santiago Gelvez
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!