Proclaim .prs BackupPresentation.json _richtextfield XML FontColor question

Page 1 of 1 (3 items)
This post has 2 Replies | 1 Follower

Posts 3
Ken True | Forum Activity | Posted: Tue, Aug 6 2019 9:13 AM

I'm in the process of writing a PHP script to parse the BackupPresentation.json file in a backup presentation file to dynamically create a 'worship roadmap' for use by the worship team.

I've got all decoding done for text highlighting done for _richtextfield XML content (for attributes FontBold, FontItalic, FontSmallCaps).   I'm a bit hung up on FontColor which shows as a 4-byte Hex like

FontColor="FFFF0000" (for Bible red text)  or FontColor="FF1E90FF" for a red color selected in the editor.

They appear to be CMYK format, but... converting from CMYK to RGB format results is the wrong colors:

CMYK: FFFF0000 (255,255,0,0) RGB(1,1,255) hex: 0101ff which displays Blue instead of the expected red.

and

CMYK: FF1E90FF (255,30,144,255) RGB(0,1,255) hex: 0001ff also displays blue instead of the expected red.

So, my question (to the developers of Proclaim) is:

What is the content of the FontColor attribute in the XML and is there a way to convert it to RGB for use in HTML output?

Posts 161
LogosEmployee
Matt Mattox (Faithlife) | Forum Activity | Replied: Tue, Aug 6 2019 1:52 PM

I believe it is ARGB (Alpha, Red, Green, Blue)

'FFFF0000' has Alpha (opacity) FF, Red: FF, Green: 00, Blue: 00

'FF1E90FF' has Alpha: FF, Red: 1E, Green: 90, Blue: FF

Posts 3
Ken True | Forum Activity | Replied: Tue, Aug 6 2019 2:00 PM

Thanks!

I can use just the last 6 characters (prepended with #) in a CSS color: directive.

Makes much better sense than CMYK (which is for printing).

Page 1 of 1 (3 items) | RSS