Copy link to clipboard
Copied
What's the weird logic in ExtendScript's GrayColor definition?
JavaScript Object Reference grayColor.gray description: “The tint of the gray. Range: 0.0 to 100.0, where 0.0 is black and 100.0 is white.”
We know that in Illustrator grayscale 0 is white and vice versa.
If you want to create white fill:
point.fillColor = new GrayColor();
point.fillColor.gray = 0;
Copy link to clipboard
Copied
Hi @andyf65867865, where does it say that? It is definitely wrong, as you noticed. Color.gray: 100 is black.
Copy link to clipboard
Copied
Hi @m1b
ADOBE ILLUSTRATOR SCRIPTING REFERENCE: JAVASCRIPT
also you could find it in the Illustrator Scripting Guide Release 0.0.1
Copy link to clipboard
Copied
it's an error, 0 should read "White" as you pointed out
Find more inspiration, events, and resources on the new Adobe Community
Explore Now