Conversation
|
Finally had enough time to look through this :-) This looks really good so far: very much looks like the approach I would have taken here. I'd probably try to find a way to convert between RGB and CMYK even if the results weren't perfect as it's a bit more polite than panicking. That said, I haven't researched or thought too deeply about this, so this might not make sense. One way to use a more configurable conversion would be a filter/conversion stream much earlier on in the rendering, similar to how (Fonts don't show up if this stream isn't set up, so perhaps an equivalent behaviour here would be to pick a fixed colour wherever a conversion isn't available) |
This is quite a mess right now and nowhere near ready, but making a PR in case you have an opinion on the matter :)
(Plus, surprisingly, it does seem to work somewhat already)
My main concern is the fact that CMYK colors don't make much sense in RGB when decoupled from color profile. So I see at least three ways of handling this:
todo!s, which could just becomepanic!s instead.lcms2and/or a trait for custom conversion implementation, to be used by the renderer(?) when needed. I worry this can get very slow and/or inaccurate, and will probably require otherwise pointless arguments to a bunch of functions.The first option seems to be the simplest and safest, if not pretty.