Set color of text based on background color
Posted: Wed Aug 14, 2024 11:49 am
I have a customer where an automated system adds text on a pdf based on an element the customer has placed in the pdf.
Normally the text is just add on a white background.
But now some files has a dark red (or other color) below, where the text should be added.
Does anybody have any ideas how I could set the color of the text based on the lightness of the area where it should be placed?
I would like to do this automatically without having the customer supply info about if the file has a background color.
Normally the text is just add on a white background.
But now some files has a dark red (or other color) below, where the text should be added.
Does anybody have any ideas how I could set the color of the text based on the lightness of the area where it should be placed?
I would like to do this automatically without having the customer supply info about if the file has a background color.