Copy link to clipboard
Copied
Hi,
I want to change the color of the highlight color and found this script, but the only colors I get to display are the ugly yellow, green, blue and white. What is the correct way of adding f.e. rgba(,244, 109, 45, 0.5) instead of yellow?
app.runtimeHighlight = true;app.runtimeHighlightColor = color.yellow;
Copy link to clipboard
Copied
You should read up on the Color object... It's basically an array of a string and then some numbers.
For example, to specify an RGB value (RBGA is not possible) of 244, 109, 45 you would use:
app.runtimeHighlightColor = ["RGB", 244/255, 109/255, 45/255];
Notice the values are between 0 and 1, which is why I divided the numbers you provided (which I assume are between 0 and 255) by 255, to bring them to the correct model.
Copy link to clipboard
Copied
Cool! You saved my day again
Yes, I should read up to the color object, it's different thinking.... I have been searching how color is coded in Java, but couldn't find clear documentation. Can you advise on a doc for dummies?
Thanks!
Copy link to clipboard
Copied
JavaScript... not Java. I know it seems pedantic but Google is pedantic.
Here's a link to the documentation for the Acrobat JavaScript color object.
Copy link to clipboard
Copied
Thanks, Joel
That doc makes perfect sense
Find more inspiration, events, and resources on the new Adobe Community
Explore Now