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

HOW TO CAPTURE TINT VALUE OF A SWATCH

Participant ,
Mar 20, 2017 Mar 20, 2017

Hi,

I have used the color (C=0 M=55 Y=100 K=55) and the tint value is 35% it replies the vlaue(C=0, M=19, Y=35, K=19) in a popup way. We are not able to capture the popup value(C=0, M=19, Y=35, K=19) using javascript. Kindly refer the screenshot below and advise.

Percnt.png

Thanks in Advance

Mahesh

561
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

correct answers 1 Correct answer

Community Expert , Mar 20, 2017 Mar 20, 2017

We are not able to capture the popup value(C=0, M=19, Y=35, K=19) using javascript.

You can get all of the tint swatches of a document via app.activeDocument.tints and a tint swatch has tintValue and a colorValue. I think you will have to loop thru the colorValue array and multiply by the tintValue/100 in order to get the output color values.

main();

function main(){

    var p=app.activeDocument.tints;

    var cv="";

        for (var i = 0; i < p.length; i++){

            var t= p.tintValue;

         

...
Translate
Community Expert ,
Mar 20, 2017 Mar 20, 2017

You can save it by clicking on the New Swatch icon at the bottom of the Swatches panel. You can save the swatches by selecting the Save Swatches from the fly-out menu and then you can subsequently Load these (.ase file) swatches into other documents.

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 ,
Mar 20, 2017 Mar 20, 2017
LATEST

We are not able to capture the popup value(C=0, M=19, Y=35, K=19) using javascript.

You can get all of the tint swatches of a document via app.activeDocument.tints and a tint swatch has tintValue and a colorValue. I think you will have to loop thru the colorValue array and multiply by the tintValue/100 in order to get the output color values.

main();

function main(){

    var p=app.activeDocument.tints;

    var cv="";

        for (var i = 0; i < p.length; i++){

            var t= p.tintValue;

            var c= p.colorValue;

            for (var j = 0; j < c.length; j++){

            cv=cv + c*(t/100) + " "

            }

        cv=cv + "\n"

    }

$.writeln("Tint Output Values:\n " + cv)

}

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