Skip to main content
Question

SVG export incorrect color profile


Peltzi
  • New Participant
  • 6 replies

Figma is delightful in how it handles color spaces in code generation, providing the exact color in the document color space AND a converted sRGB color fallback for the unsupporting renderers.

However, this is not the behavior when it comes to copying or exporting as SVG. Here, Figma will output the original color in the specified color space but the sRGB fallback color is unconverted.

I have a document in Display P3 color space and I have a color #00beaa. If I use the Inspector to view the style details, the output is

fill: #00C2AA; /* appropriately converted color */
fill: color(display-p3 0 0.7451 0.6667);

If I use the “Copy as SVG” or the Export feature, the output is instead

fill: #00BEAA; /* the original color NOT from the original color space */
fill: color(display-p3 0.0000 0.7451 0.6667); /* what's with the precision of the zero value, by the way? */

This behavior will distort the intended color more than it should, and the difference from the generated code is unexpected.

0 replies

Be the first to reply!

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings