Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

GrayColor

Engaged ,
Nov 23, 2024 Nov 23, 2024

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;

 

 

 

 

TOPICS
Bug , Scripting
193
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Nov 23, 2024 Nov 23, 2024

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Nov 23, 2024 Nov 23, 2024

Hi @m1b 
ADOBE ILLUSTRATOR SCRIPTING REFERENCE: JAVASCRIPT

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 23, 2024 Nov 23, 2024
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines