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

80
Views
Color picking by coordinates

When using a colorpicker like from google, the luminosity at the top left is 100%, on the top right it is 50%. However on both corners on the bottom the luminosity is 0%.

What's the mathematical function to compute the luminosity?

Here's the code I already have:

const map = (val, in_min, in_max, out_min, out_max) =>
    ((val - in_min) * (out_max - out_min)) / (in_max - in_min) + out_min;

let hue = 0;
let s = map(y, 0, width, 0, 100); // y: y position of the cursor, width: width of the color field

Nevermind, i was reading hsl but the values i was getting were hsv

about 4 years ago · Juan Pablo Isaza
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!