[MPEG-OTSPEC] COLRv1 to gray/alpha question (& color-blindness question)

Hin-Tak Leung htl10 at users.sourceforge.net
Thu Jul 20 17:21:02 CEST 2023


    On Thursday, 20 July 2023 at 01:41:51 BST, Alexei Podtelezhnikov <apodtele at gmail.com> wrote:  
 > > > Hin-Tak,
> >
> > > This is probably both a spec question & a technical question. What is the recommendation for COLRv1 when the rendering target media is not capable of color?
> >
> >

> Alpha is colorless until blended. Therefore any conversion of RGB to
> alpha will produce random blending results because assuming black
> foreground is wrong even on gray surfaces. Hence, the blending should
> be done in color (on gray surface r=g=b), then the final result can be
> converted to gray once again for display as above. This is essentially
> what should happen in ftgrid/ftview if you choose 8-bit display,
> e.g.,"-d 800x600x8".
That's not how it is done on my COLRv1-capable ftgrid/ftview. It is an implementation details - I mentioned it twice already, but I'll repeat it a 3rd time:
Converting from 32-bit RGBA multi-layered COLRv1 data to 8-bit, I have a choice of telling Skia it is all Alpha or it is all Gray. In the former case, Skia seems to throw way all the RGB data and just collapse the multiple Alpha layers onto one, and draw the foreground Black through the combined Alpha mask.
In the 2nd case it is more interesting. As I said, pale solid colors and dark transparent colors renders very differently. If you throw away the alpha data first before collapsing and overlaying the successive glyph layers from 24-bit to 8-bit. Skia seems to think that, since the target media in this case is not transparency-capable, let's throw away the alpha  channel first, before drawing the overlayjng layers as solid shades of grays .
Probably both approaches are wrong. I am asking that question both in terms of the spec and in terms of implementation details - what is the correct/recommended approach to render multi-layered 32-bit RGBA COLRv1 data to a non-colour target media?  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.aau.at/pipermail/mpeg-otspec/attachments/20230720/199ce8df/attachment.html>

More information about the mpeg-otspec mailing list