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

182
Views
¿Cómo hago que el fondo tenga un color hexadecimal aleatorio? También para que no haya duplicados.

Mi PNG es un fondo transparente. cuando ejecuto el script, me da los mismos 10 colores. Cuando configuro el brillo en 0%, no se generan colores. Tratando de hacerlo para que se genere un número hexadecimal aleatorio para cada imagen y no haya repeticiones.

 const gif = { export: false, repeat: 0, quality: 100, delay: 500, }; const text = { only: false, color: getRandomColor(), size: 20, xGap: 40, yGap: 40, align: "left", baseline: "top", weight: "regular", family: "Courier", spacer: " => ", }; function getRandomColor() { var letters = '0123456789ABCDEF'; var color = '#'; for (var i = 0; i < 6; i++) { color += letters[Math.floor(Math.random() * 16)]; } return color; } '#'+(Math.random() * 0xFFFFFF << 0).toString(16).padStart(6, '0'); function setRandomColor() { $("#colorpad").css("background-color", getRandomColor()); } const pixelFormat = { ratio: 2 / 128, }; const background = { generate: true, brightness: "50%", static: false, default: getRandomColor(), };
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!