typst / svg2pdf

Converts SVG files to PDF.
Apache License 2.0
273 stars 32 forks source link

Colors are not represented accurately #47

Closed LaurenzV closed 9 months ago

LaurenzV commented 10 months ago

Consider the following SVG:

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
        "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg" version="1.1" >
  <rect x="0" y="0" width="200" height="200" fill="#111122" />

</svg>

The output color will look much darker (approximately rgb(6, 6, 29) instead of rgb(17, 17, 34)) than it should be.

We should change to using ICCProfiles to make colors more accurate.