Generador de filtro de modo oscuro
Genera un filtro CSS que convierte una interfaz clara en oscura sin reescribir ninguno de sus estilos. Dale un color de fondo objetivo y resuelve la cadena de filtros por ti, o ajusta las funciones de filtro individuales a mano y observa la vista previa actualizarse.
The filter it produces is closely related to the CSS Filter Generator and the Glassmorphism CSS Generator. Contrast in the inverted state still needs the Color Contrast Checker, since inverting both sides of a pair does not preserve the ratio.
Cómo usar Filtro modo oscuro
- 1 Choose a mode. One applies a filter to darken a light interface; the other solves the chain that turns a target colour into the colour you want.
- 2 For the inversion mode, set the filter and see the preview update across the sample interface.
- 3 Adjust the hue rotation so that colours return to roughly their original hue after inversion — this is the step people usually miss.
- 4 Copy the generated rule, and remember to exclude images and video from it.
Cómo usarlo
Introduce el color de fondo oscuro que quieres, y el solucionador calcula los valores invert, sepia, saturate, hue-rotate, brightness y contrast que transforman el blanco en ese color. La vista previa aplica el filtro a una interfaz de maqueta para que juzgues el resultado, y el panel CSS guarda la declaración lista para pegar.
- Solucionador de color objetivo para la cadena de filtros
- Control manual de cada función de filtro
- Vista previa en vivo sobre una interfaz de maqueta
- Regla complementaria para mantener las imágenes normales
- Preajustes para temas oscuros comunes
El problema de las imágenes
Un filtro invert general también invierte tus fotografías, convirtiéndolas en negativos. La solución habitual es aplicar el mismo filtro una segunda vez a las imágenes, lo que cancela la inversión dejando la interfaz circundante oscura. El CSS generado incluye esa regla.
Preguntas frecuentes
Why does a plain `invert(1)` produce such odd colours?
Because inverting a colour is not the same as swapping its lightness. Inversion also maps each hue to its opposite, so a blue interface becomes orange, a red button becomes cyan, and skin tones turn a sickly blue. The standard correction is to invert and then apply a 180-degree hue rotation, which returns hues close to where they started while keeping the lightness inverted.
Why must images and video be excluded?
Because they are already the colours they should be. Applying the filter to a photograph inverts it, and the hue rotation brings the hues partway back but leaves everything looking like a colour negative. The usual approach is to re-invert images inside the filtered container, applying the same filter a second time so they cancel out.
Is a filter-based dark mode as good as a real one?
No, and it is worth being clear about the trade-off. A proper dark theme adjusts each surface, text colour and border deliberately, so contrast is controlled and brand colours shift in a considered way. A filter is a retrofit that works acceptably on an interface you do not control, such as a third-party embed or a legacy tool — not a substitute for designing a real dark theme when you can.
Herramientas de imagen y color relacionadas
También te puede interesar
Herramientas de otras categorías que suelen combinarse con Filtro modo oscuro: