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

THEME_COLOR

Guide ,
Jun 13, 2017 Jun 13, 2017

Copy link to clipboard

Copied

Hi all,

just burnt an hour because documentation on THEME_COLOR was left as an exercise.

The following works with InDesign and Illustrator.

function main()

{

  var palette = this.palette = new Window("""palette""");

  var graphics = palette.graphics;

  $.writeln("Brush:");

  var colors = ["background","disabledBackground","selection","focusRing"];

  while( colors.length ) {

    var name = colors.pop();

    $.writeln(name," = ",graphics.newBrush(graphics.BrushType.THEME_COLOR,name).color.toSource());

  }

  $.writeln();

  $.writeln("Pen:");

  var colors = ["foreground","disabledForeground","selection"];

  while( colors.length ) {

    var name = colors.pop();

    $.writeln(name," = ",graphics.newPen(graphics.PenType.THEME_COLOR,name,1).color.toSource());

  }

  $.writeln();

}

main();

Regards,

Dirk

TOPICS
Scripting

Views

315

Translate

Translate

Report

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
no replies

Have something to add?

Join the conversation
Adobe