hey there! have you tried using a transparent PNG instead? that might work better with dark mode. also, you could try adding a light border around the white stripe to keep it visible. something like:
Have you considered using CSS custom properties (variables) with a fallback value? This approach can help maintain color consistency across different modes. Here’s an example:
This method explicitly sets the white color for both light and dark modes, which should prevent Gmail from inverting it. Remember to test thoroughly, as email client support for CSS can vary.
I’ve encountered this issue before, and it can be frustrating. One solution that worked for me was using a background image instead of individual color blocks. Create a single image of the French flag and set it as the background of a div or table cell. This method tends to be more resilient to dark mode changes.
Make sure your image has good contrast between the colors, especially the white stripe. You might need to experiment with different image formats (PNG, WebP) to find what works best across various email clients and dark mode settings. Good luck with your template!