Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

81
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda