Suped

Summary

Adding a background color to your BIMI SVG logo, especially for dark mode compatibility, requires specific SVG coding practices. Standard HTML style attributes are often not permitted within BIMI SVG Tiny 1.2 files, leading to validation warnings or display issues. The correct approach involves embedding the background directly within the SVG structure, typically using a rect element or a path with a defined fill, placed behind your logo's main elements. This ensures compliance with BIMI specifications and proper rendering across various email clients and display modes (e.g., light and dark themes). Understanding the precise SVG structure is key to avoiding common validation errors and ensuring your logo appears as intended.

What email marketers say

Email marketers often encounter challenges when adding a background color to their BIMI SVG logos, particularly when aiming for optimal display in dark mode. The primary issue revolves around the strict formatting requirements of the SVG Tiny 1.2 standard mandated by BIMI. Marketers report that direct CSS styling using the style attribute typically results in validation warnings or outright failure to display the background correctly. The consensus points towards using native SVG elements to create the background, ensuring compatibility and a professional appearance in all viewing conditions.

Marketer view

Marketer from Email Geeks suggests that adding a background color for dark mode is essential, but direct styling like style="background-color:white" causes validation errors. This highlights the strict parsing of BIMI SVG Tiny 1.2 files. They found that while a logo might initially validate without a background style, attempting to add it in a non-compliant way immediately triggers warnings, preventing proper display.

25 Jan 2022 - Email Geeks

Marketer view

Marketer from Email Geeks indicates that simply using fill="#FFFFFF" on the primary path turns the entire logo white if the path itself is the shape. This points to the need for a separate element for the background. This experience reinforces that the background cannot be applied indiscriminately, but rather needs to be a distinct layer within the SVG.

25 Jan 2022 - Email Geeks

What the experts say

Experts in email deliverability and SVG graphics confirm that the standard CSS style attribute is not supported for background colors in BIMI SVG Tiny 1.2 files. The recommended approach involves explicitly drawing a background shape, like a rectangle (rect) or a path (path), within the SVG code itself and positioning it behind the logo. This method ensures the background is part of the SVG structure, which is critical for proper rendering and validation.

Expert view

Expert from Email Geeks confirms that directly setting a background color using a fill attribute on a path could turn the entire logo white if the path is the main shape. They advise that a separate path or element is needed for the background layer. This highlights the need for careful layering within the SVG structure to properly separate the logo from its background.

25 Jan 2022 - Email Geeks

Expert view

Expert from Email Geeks suggests using Inkscape, a free vector graphics editor, to help create or modify BIMI SVG files. They also offer to review the file directly, emphasizing that graphical tools are often more effective than manual code editing for such tasks. This points to the practicality of using specialized software to ensure SVG compliance for BIMI.

25 Jan 2022 - Email Geeks

What the documentation says

Official BIMI documentation and related technical specifications consistently emphasize the need for BIMI SVG logos to be in the SVG Tiny 1.2 profile. This profile has specific restrictions on permitted elements and attributes, which directly impacts how background colors can be applied. The documentation explicitly advises against transparent backgrounds, recommending a solid color to ensure consistent display across various email clients and themes, including dark mode. The correct method involves creating a distinct SVG shape, such as a rectangle, and assigning it a solid fill color, ensuring it is positioned as the base layer of the logo graphic.

Technical article

Documentation from BIMI Group states that logos should be square, high-resolution images with a solid background color. They explicitly advise that transparent backgrounds may not display as expected, highlighting a critical requirement for consistent rendering.

20 Aug 2020 - BIMI Group

Technical article

Documentation from Zoho Mail's advanced email configuration guide recommends setting the baseProfile attribute to "tiny-ps" and the version attribute to "1.2" for BIMI logos. This indicates that these specific profile settings are fundamental to compliant SVG files.

18 Dec 2023 - Zoho Mail

10 resources

Start improving your email deliverability today

Get started
    How do I add a background color to my BIMI SVG logo? - Technical - Email deliverability - Knowledge base - Suped