If your app or website supports dark mode, you've probably noticed that images designed for light backgrounds look wrong on dark ones. White logos become invisible, product photos with white backgrounds create harsh boxes, and screenshots look odd. Here's how to handle images for dark mode.
The Problem\n\nImages designed for light mode:\n- White backgrounds create bright rectangles on dark pages\n- Light-colored text in screenshots becomes invisible\n- Product photos with white backgrounds lack contrast\n- Shadows and depth effects look wrong on dark surfaces
Solution 1: Transparent Backgrounds\n\nThe best solution is to use images with transparent backgrounds. They adapt to any background color.\n\n1. Go to pixelforgeai.club/tools/remove-bg\n2. Upload your image\n3. Download as transparent PNG\n\nThe transparent version works on both light and dark backgrounds.
Solution 2: Create Two Variants\n\nFor complex images (screenshots, graphics with built-in backgrounds), create two versions:\n- Light variant: For light mode backgrounds\n- Dark variant: Invert the background or use CSS filter `invert(1) hue-rotate(180deg)` for a quick fix
Solution 3: Use CSS Filters\n\nFor simple images, CSS can handle the adaptation:\n```css\n@media (prefers-color-scheme: dark) {\n img.logo { filter: brightness(0) invert(1); }\n img.screenshot { filter: brightness(0.8) contrast(1.1); }\n}```\n\nThis inverts a light logo to dark, and adjusts screenshots for dark backgrounds.
Best Practice\n\nUse transparent PNGs wherever possible. They're the most versatile format and work on any background color without adjustment.
Ready to put these tips into action?
Try Our Tools β