typst/svg2pdf

Colors are not represented accurately

LaurenzV opened this issue · 0 comments

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.