Skip to main content
Inspiring
November 23, 2024
Question

GrayColor

  • November 23, 2024
  • 2 replies
  • 339 views

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;

 

 

 

 

This topic has been closed for replies.

2 replies

CarlosCanto
Community Expert
Community Expert
November 23, 2024

it's an error, 0 should read "White" as you pointed out

m1b
Community Expert
Community Expert
November 23, 2024

Hi @andyf65867865, where does it say that? It is definitely wrong, as you noticed. Color.gray: 100 is black.

Inspiring
November 23, 2024

Hi @m1b 
ADOBE ILLUSTRATOR SCRIPTING REFERENCE: JAVASCRIPT

also you could find it in the Illustrator Scripting Guide Release 0.0.1