lowUGLY

Broken Dark Mode in Vibecoded Apps

Broken dark mode is a common visual bug in vibecoded apps. AI tools add a theme toggle but leave hardcoded colors throughout the app — resulting in invisible text on dark backgrounds, jarring white components in an otherwise dark UI, and images that clash with the dark theme.

Last updated: 2026-03-14

Identifying Dark Mode Bugs

Toggle dark mode on and visit every page in the app. Look for white or light-colored cards, inputs, and containers that did not switch themes. Check text readability — dark text on a dark background is invisible, and light text on a white background within a dark page is equally problematic.

Inspect third-party components, embedded content, and dynamic elements. Modals, tooltips, dropdowns, and date pickers are frequently missed in theme implementations because they are rendered in portals outside the main component tree. Also check status indicators, badges, and charts that may use hardcoded colors rather than theme tokens.

Reproducing Dark Mode Bugs

Switch between light and dark mode on every page. Some pages may work in one mode but not the other. Also test the transition — toggle rapidly and check for flash-of-wrong-theme (FOWT) where the page briefly shows the wrong mode before applying the correct one.

Test dark mode with different system settings. Set your OS to dark mode and see if the app respects the system preference. Switch the system preference while the app is open and verify it adapts without requiring a page reload. AI-generated theme logic often ignores the prefers-color-scheme media query.

Fixing Dark Mode in Vibecoded Apps

Replace all hardcoded color values with CSS custom properties or theme tokens. Every color in the app should reference a variable that changes based on the active theme. This includes colors in inline styles, SVG fills, box shadows, and border colors that AI tools often leave as literal hex values.

Use a theme provider that applies the theme class to the document root and stores the preference in localStorage. Load the stored preference before the first render to prevent flash-of-wrong-theme. For images and logos, provide dark mode variants or apply CSS filters to adapt them to the dark background.

Frequently Asked Questions

Why is dark mode so buggy in vibecoded apps?

AI tools add dark mode as a toggle and a few CSS rules but miss the hundreds of individual color values throughout the app. They hardcode colors in inline styles, component-level CSS, and third-party component configurations that the theme toggle does not reach.

What is the fastest way to find dark mode color issues?

Toggle dark mode on and slowly scroll through every page while looking for elements that are clearly the wrong brightness. White boxes, invisible text, and overly bright images stand out immediately against a dark background.

Ready to test your app?

Submit your vibecoded app and get real bug reports from paid human testers. Starting at just €15.

Related articles