Skip to content

Profile-based Color Management for Preview and PDF export #3143

@tilman-schieber

Description

@tilman-schieber

Description

1. Features

The typst compiler should

  1. allow to specify an output ICC color profile (e.g. command line option --icc-profile ).
  2. convert the colors to the specified output profile when writing the pdf. If none is specified default to the sRGB profile currently used.
  3. use a "proofing" transform (see details) to RGB so we get a better preview of CMYK colors.
  4. include a few commonly used ICC profiles to improve usability. The most commonly used color profile for offset print ist ISOcoatedv2.

2. Details

One of the most popular color management C libraries is Little-CMS, which is used by Scribus, Imagemagick, GIMP, Inkscape and many more. It is open source (MIT License).
For improving the preview of documents with CMYK-colors, it offers a function cmsCreateProofingTransform that allows a transformation to RGB that tries to get the colors to look on the screen as it would when printed with the destination profile. (see the docs,p.25)

Use Case

CMYK colors are supported in typst. However most printers require an embedded CMYK color profile in the pdf file.

Additionally, improving the preview of cmyk colors in the Web App so it is consistent with common pdf viewers (that use proper color management) would be helpful.
To illustrate this issue: create a CMYK color that mixes Cyan and Magenta, e.g.
cmyk(80%,80%,0,0). Observe how it is blue in the webapp but violet in the downloaded pdf.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestNew feature or requesthelp wantedExtra attention is neededpdfRelated to PDF export or PDF embedding.pngRelated to PNG export.visualizeRelated to the visualize category, which is about drawing and illustrating

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions