5 Replies Latest reply on Jul 19, 2018 8:14 PM by Kukurykus

    Change Working Spaces

    rob day Adobe Community Professional & MVP

      Is there a way to change the Color Settings CMYK and RGB working spaces with  js? I'm not having a problem assigning or converting profiles for a document, I want to change the application color settings.

        • 1. Re: Change Working Spaces
          pixxxel schubser MVP & Adobe Community Professional

          Hi ,

          do you mean something like this?

          if (app.colorSettings != 'AdobeRGB'){
              app.colorSettings = 'AdobeRGB'; 
              } 
          

           

           

          Have fun

           

          • 2. Re: Change Working Spaces
            rob day Adobe Community Professional & MVP

            I tried that but it just opens the Color Setting dialog without changing anything. I want to change the Color Settings Working Space before I open a file. I'm actually working working in AppleScript but can't do it there so all I want is a simple doScript.

            • 3. Re: Change Working Spaces
              xbytor2 Level 4

              function setWorkingRGB(space) {
                function cTID(s) { return app.charIDToTypeID(s); };
                function sTID(s) { return app.stringIDToTypeID(s); };

                  var desc1 = new ActionDescriptor();
                      var ref1 = new ActionReference();
                      ref1.putProperty( cTID('Prpr'), sTID('colorSettings') );
                      ref1.putEnumerated( cTID('capp'), cTID('Ordn'), cTID('Trgt') );
                  desc1.putReference( cTID('null'), ref1 );
                      var desc2 = new ActionDescriptor();
                      desc2.putString( sTID('workingRGB'), space );
                  desc1.putObject( cTID('T   '), sTID('colorSettings'), desc2 );
                  executeAction( cTID('setd'), desc1, DialogModes.NO );
              };

               

              function setWorkingCMYK(space) {
                function cTID(s) { return app.charIDToTypeID(s); };
                function sTID(s) { return app.stringIDToTypeID(s); };

                  var desc4 = new ActionDescriptor();
                      var ref3 = new ActionReference();
                      ref3.putProperty( cTID('Prpr'), sTID('colorSettings') );
                      ref3.putEnumerated( cTID('capp'), cTID('Ordn'), cTID('Trgt') );
                  desc4.putReference( cTID('null'), ref3 );
                      var desc5 = new ActionDescriptor();
                      desc5.putString( sTID('workingCMYK'), space );
                  desc4.putObject( cTID('T   '), sTID('colorSettings'), desc5 );
                  executeAction( cTID('setd'), desc4, DialogModes.NO );
              };

              • 4. Re: Change Working Spaces
                rob day Adobe Community Professional & MVP

                Thanks, but I'm getting an error. Tried in both CC and CC2014:

                 

                Screen Shot 2014-10-15 at 8.42.13 AM.png

                • 5. Re: Change Working Spaces
                  Kukurykus Adobe Community Professional

                  It is because you did mistake. You missed space between 'e' and 'R', so it should be: setWorkingRGB("Adobe RGB (1998)")