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

Can I get the values of activeDocument.defaultFillColor

New Here ,
Dec 16, 2018 Dec 16, 2018

Hi,

I'm creating a new color picker panel for illustrator cc 2018.

I know how to set fillColor/strokeColor for selection.

activeDocument.defaultFillColor = newColor;

When I select a color, I send the value to defaultFillColor or defaultStrokeColor.

But if I change defaultFillColor by the original color picker dialog, how can I get  activeDocument.defaultFillColor?

Is there a event listerer in illustrator?

TOPICS
Scripting
392
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 ,
Dec 16, 2018 Dec 16, 2018
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
Advocate ,
Dec 16, 2018 Dec 16, 2018

Bonjour,

Tout simplement

var color = docRef.defaultFillColor;

alert(color.typename);

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
New Here ,
Dec 16, 2018 Dec 16, 2018
LATEST

I am worried that I did not explain clearly.

When I change color by my color picker, the defaultFillColor will be changed.

But when the defaultFillColor is changed by selecting one filled path or original color picker dialog, how can I get the new defaultFillColor to update my color picker automatically?

@pixxxel schubser

pixxxel schubserThank you for your reply. Do you mean I need to use C#?

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