2 Replies Latest reply on Mar 20, 2017 7:46 AM by rob day

    HOW TO CAPTURE TINT VALUE OF A SWATCH

    Mahesh_JW Level 1

      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

        • 1. Re: HOW TO CAPTURE TINT VALUE OF A SWATCH
          Derek Cross Level 6

          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.

          • 2. Re: HOW TO CAPTURE TINT VALUE OF A SWATCH
            rob day Adobe Community Professional & MVP

            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[i].tintValue;
                        var c= p[i].colorValue;
                        for (var j = 0; j < c.length; j++){
                        cv=cv + c[j]*(t/100) + " "
                        }
                    cv=cv + "\n"
                }
            $.writeln("Tint Output Values:\n " + cv)
            }