Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

377
Vistas
How can I change a hex color on a webpage with javascript?

I am writing a web extension (Chrome, Firefox) and I want to know what JavaScript will replace a style element's color with a different color. There is a style section that has

<style> --toolbar-bg-color: #0087FF; </style>

and I want to make that just a white background (#FFFFFF). Is there an easy JavaScript command that might do this?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

If the parent element has an id you could do something like this:

let element = document.getElementById('parentElement');
element.style['--toolbar-bg-color'] = '#FFFFFF';

Try it and let me know how it goes :)

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda