Javascript colour
Hi,
In a PDF document, I want to change the colour of a button by using this code:
event.target.fillColor = color.black;
How can I personalize the colour? The RGB colour is 190, 21, 34.
Thanks,
Hi,
In a PDF document, I want to change the colour of a button by using this code:
event.target.fillColor = color.black;
How can I personalize the colour? The RGB colour is 190, 21, 34.
Thanks,
The color object in Acrobat JS is an array with a color-space name and the values between 0 and 1.
So your example would be:
event.target.fillColor = ["RGB", 190/255, 21/255, 34/255];
By the way, in the future please post follow-up questions under the original thread.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.