typst icon indicating copy to clipboard operation
typst copied to clipboard

SVG with ICC colors is not rendered correctly

Open Wongboo opened this issue 2 years ago • 7 comments

Description

svg rendered weired 截屏2024-04-21 21 49 45 截屏2024-04-21 21 50 15

Reproduction URL

https://typst.app/project/ph2HV071Y0tJ1lVojf8ytt

Operating system

Web app

Typst version

  • [X] I am using the latest version of Typst

Wongboo avatar Apr 21 '24 13:04 Wongboo

The project does not seem to be accessible, can you post the SVG here?

LaurenzV avatar Apr 21 '24 14:04 LaurenzV

https://typst.app/project/wW5kE31GRsDhL6TcmJ0eIg this can be seen and edited.

Wongboo avatar Apr 22 '24 02:04 Wongboo

Ah I see now... The problem is that your SVG seems to use icc colors, which is currently not supported by the upstream crate. So if you somehow have control over that, you should try to change it so it uses "normal" rgb colors. But a bug nevertheless.

LaurenzV avatar Apr 22 '24 06:04 LaurenzV

Thank you for your reply! I now see how the problem happens. BTW, Is there any CLI tool to convert icc to rgb? inkscape seems can't.

Wongboo avatar Apr 22 '24 06:04 Wongboo

Not that I know of, unfortunately. :(

LaurenzV avatar Apr 22 '24 06:04 LaurenzV

Ah I see now... The problem is that your SVG seems to use icc colors, which is currently not supported by the upstream crate. So if you somehow have control over that, you should try to change it so it uses "normal" rgb colors. But a bug nevertheless.

Is this a duplicate of https://github.com/typst/typst/issues/3781 ?

Enivex avatar Apr 22 '24 10:04 Enivex

No, this is a different issue.

LaurenzV avatar Apr 22 '24 10:04 LaurenzV

@Wongboo et al. Martin from the Inkscape project is currently working on full ICC support for Inkscape. This is an enormous project, but as soon as https://gitlab.com/inkscape/extensions/-/merge_requests/646 is completed it should be trivial to do what you need.

joneuhauser avatar Aug 30 '24 11:08 joneuhauser