37 Replies Latest reply on Jan 8, 2017 1:30 AM by Laubender

    Strange problem: Pasting text to InDesign CC2015 always adds cyan color

    Larstown Level 1

      Every time I paste a text into any InDesign document in InDesign CC2015 – it also imports the color 100% cyan to my swatch library. (They text is still black though, and there is no background color or anything.)

      Anyone knows why this happens?!?

      Not a big deal but quite odd...

        • 1. Re: Strange problem: Pasting text to InDesign CC2015 always adds cyan color
          Laubender Adobe Community Professional & MVP

          Hi Lars,

          this is caused by the new Paragraph Shading feature where Cyan* is used as default color for the shading.

           

          Example:

          Add a new document.

          Remove all unused colors from the Swatches Panel.

           

          * The standard cyan swatch "C=100 M=0 Y=0 K=0" is still there (together with all colors in brackets you cannot remove).

           

          So, if you remove this swatch, you have to substitute it with something else, let's say "[Black]" (by default).

          Now copy/paste text from a different document to the document you removed "C=100 M=0 Y=0 K=0".

          In the moment you paste the text, "C=100 M=0 Y=0 K=0" is back again.

           

          Uwe

          • 2. Re: Strange problem: Pasting text to InDesign CC2015 always adds cyan color
            Laubender Adobe Community Professional & MVP

            Another note on this.

             

            What is not working:

            Changing the default fill color of paragraph shading, if you are changing the defaults of your "Basic Paragraph Style" when no document is open to "None" and proceed.

            You still have a swatch named "C=100 M=0 Y=0 K=0" that is in use. I suspect, that fill color "C=100 M=0 Y=0 K=0" is part of the "invisible" "No Paragraph Style" paragraph style. And "Basic Paragraph Style" is based on "No Paragraph Style".

             

            Just tested this by scripting (ExtendScript/JavaScript) and can confirm my assumption.

            One can address the "No Paragraph Style" by the index of 0 of the paragraph styles collection of the app (that means InDesign) like that:

             

            app.paragraphStyles[0].paragraphShadingColor.name;
            

             

            will return "C=100 M=0 Y=0 K=0".

             

            And one cannot change this. Even by scripting.

            Trying to assign "None" to the paragraph shading color property as value

             

            app.paragraphStyles[0].paragraphShadingColor = "None";
            

             

            will throw an error.

             

            So "C=100 M=0 Y=0 K=0" will stay with us for a long time, I suspect ;-)

             

            Uwe

            • 3. Re: Strange problem: Pasting text to InDesign CC2015 always adds cyan color
              Larstown Level 1

              Thanks Uwe!

               

              Just quite annoying...

              For example:

              If I have a document that will be printed in b/w (like a book inlay) – I like to remove all swatches so that I'm 100% sure that no text is still set in color.

               

              Lars

              • 4. Re: Strange problem: Pasting text to InDesign CC2015 always adds cyan color
                Laubender Adobe Community Professional & MVP

                Yes, I see this problem.

                And it is not only about text. You do not know in advance, if "C=100 M=0 Y=0 K=0" is used or not on fills, strokes (or gradients) of any kind.

                Just removing "C=100 M=0 Y=0 K=0" and substitute it with "[Black]" may result in an optical problem. Hm, instead of substitute it with pure black a better move would be to substitute it with a tint of black; but the percentage of that tint would vary depending of your printing method…

                 

                Uwe

                • 5. Re: Strange problem: Pasting text to InDesign CC2015 always adds cyan color
                  Larstown Level 1

                  Hands up all the InDesign users that have been longing for this new amazing feature...

                   

                  / L

                  • 6. Re: Strange problem: Pasting text to InDesign CC2015 always adds cyan color
                    rob day Adobe Community Professional & MVP

                    What is not working:

                    Changing the default fill color of paragraph shading, if you are changing the defaults of your "Basic Paragraph Style" when no document is open to "None" and proceed.

                    You still have a swatch named "C=100 M=0 Y=0 K=0" that is in use. I suspect, that fill color "C=100 M=0 Y=0 K=0" is part of the "invisible" "No Paragraph Style" paragraph style. And "Basic Paragraph Style" is based on "No Paragraph Style".

                     

                    I was able to stop the behavior by closing all documents, deleting all of the swatches except for the required [Black], [Paper], [Registration] and replacing with [Paper] when prompted. I then made my own default swatches. Now the Paragraph Shading default is paper for new documents and all of my swatches are selected on Select All Unused:

                     

                    ScreenSnapz001.png

                    • 7. Re: Strange problem: Pasting text to InDesign CC2015 always adds cyan color
                      rob day Adobe Community Professional & MVP

                      Example:

                      Add a new document.

                      Note that I closed all documents before deleting all of the non required swatches.

                      • 8. Re: Strange problem: Pasting text to InDesign CC2015 always adds cyan color
                        Laubender Adobe Community Professional & MVP

                        Hi Rob,

                        yes, that is working, if you work on your own and do not bring any documents from outside into play.

                        Thank you for suggesting this!

                         

                        Uwe

                        • 9. Re: Strange problem: Pasting text to InDesign CC2015 always adds cyan color
                          rob day Adobe Community Professional & MVP

                          I can't get at 2015 at the moment but for incoming docs where the cyan swatch is sticky why not use your script to set the color to [Paper] instead of the "None" that throws the error? In that case the non required "C=100 M=0 Y=0 K=0" swatch should be unused assuming it isn't used elsewhere.

                          • 10. Re: Strange problem: Pasting text to InDesign CC2015 always adds cyan color
                            Larstown Level 1

                            Seems like Adobe fixed this – I just updated to the new version of InDesign (11.0.1.105) and the blue color isn't appearing any more when I paste a text in a document...

                            (Soon we will all be missing that blue little swatch.)

                            • 11. Re: Strange problem: Pasting text to InDesign CC2015 always adds cyan color
                              Laubender Adobe Community Professional & MVP

                              Hi Lars,

                              can you describe what's going on in more detail?

                               

                              Yesterday I've updated InDesign to v11.0.1 and cannot confirm your finding.

                              Color "C=100 M=0 Y=0 K=0" is still added to a document, if I paste text from a fresh new doc to a document where I changed "C=100 M=0 Y=0 K=0" to "[Black] 20%".

                              Tested on Mac OSX 10.10.3.

                               

                              What is your OS version?

                               

                              Uwe

                              • 12. Re: Strange problem: Pasting text to InDesign CC2015 always adds cyan color
                                Laubender Adobe Community Professional & MVP

                                However with the help of Rob, I found out that exchanging the standard "[C=100 M=0 Y=0 K=0]" with "[Paper]" when no document is open and rebuilding a new "[C=100 M=0 Y=0 K=0]" afterwards to stay in synch with the behavior of InDesign CC-2014 will remove the problem for all new documents built from now on.

                                 

                                Opening older documents saved in v11.0.0 and older documents saved in v10.2 or below will still struggle with a "[C=100 M=0 Y=0 K=0]" that is tied to the fill color of paragraph shading of the "[No Paragraph Style]" style. But we could change this on an individual bases doc by doc as well.

                                 

                                @Rob – a note about the scripting side:
                                At least in ExtendScript I am not able to assign a different color to the paragraphShadingColor property of paragraphs[0], the "[No paragraphs style]". But what we can do is removing "[C=100 M=0 Y=0 K=0]" and exchanging that with "[Paper]" (or any other color I suppose) by using the scripting method remove(). This code in ExtendScript will work:

                                 

                                //For the active document:
                                app.documents[0].colors.itemByName("C=100 M=0 Y=0 K=0").remove(app.documents[0].colors.itemByName("Paper"));
                                

                                 

                                //For the app, best used when no documents are open, setting a new default value:
                                app.colors.itemByName("C=100 M=0 Y=0 K=0").remove(app.documents[0].colors.itemByName("Paper"));
                                

                                 

                                And afterwards one could add a new color named "[C=100 M=0 Y=0 K=0]" that falls in the category "Unused Color".

                                 

                                Uwe

                                • 13. Re: Strange problem: Pasting text to InDesign CC2015 always adds cyan color
                                  Larstown Level 1

                                  Hi Uwe,

                                   

                                  I use:
                                  InDesign 11.0.1.105

                                  OSX 10.10.4


                                  Before I got the new update – every time I pasted text into a document it added the color 100% Cyan to my swatch library.

                                   

                                  After updating to the new InDesign 11.0.1.105 yesterday, this doesn't happen any more. (Neither in an old or in a new/empty document.)



                                  / Lars








                                  • 14. Re: Strange problem: Pasting text to InDesign CC2015 always adds cyan color
                                    Laubender Adobe Community Professional & MVP

                                    Hi Lars,

                                    hm – and I'm on OSX 10.10.3. Strange. And you pasted from a new InDesign document?
                                    Did you remove "[C=100 M=0 Y=0 K=0]" and exchanged that with "[Paper]" as Rob suggested (no documents open)?

                                     

                                    Uwe

                                    • 15. Re: Strange problem: Pasting text to InDesign CC2015 always adds cyan color
                                      Larstown Level 1

                                      Hi,

                                       

                                      No. I usually don’t have any swatches in my new documents (I prefer to add only the colors I use for that document), so in a new document I only have: Black, Paper and Registration.

                                       

                                      I don't think I changed anything, except just updating InDesign.


                                      / Lars

                                      • 16. Re: Strange problem: Pasting text to InDesign CC2015 always adds cyan color
                                        Laubender Adobe Community Professional & MVP

                                        So you changed "C=100 M=0 Y=0 K=0" to something else before doing the update, right?

                                         

                                        Uwe

                                        • 17. Re: Strange problem: Pasting text to InDesign CC2015 always adds cyan color
                                          Larstown Level 1

                                          Not really, since I always keep my preset document without any swatches (except Black, Paper and Registration) it was not in there.

                                           

                                           

                                          Then I just upgraded and discovered that when I paste text in the new version the cyan color doesn't show up.

                                           

                                          L

                                          • 18. Re: Strange problem: Pasting text to InDesign CC2015 always adds cyan color
                                            GrafikLVM Level 1

                                            Hallo, kann ich Deutsch hier sprechen? :-)

                                            Hello, can i speake here in German? :-)

                                             

                                            Anyways... i realized also this bug (no feature!).

                                            So you solved this problem with scripting?

                                            i am a n00b with this, can you describe it?

                                             

                                            and why the hell the consumer must solve this,

                                            and not the company who gets our money??

                                             

                                            you can describe it in german for better understanding :-)

                                            thank you! - Marco

                                            • 19. Re: Strange problem: Pasting text to InDesign CC2015 always adds cyan color
                                              lisag34437394

                                              Hi all,

                                               

                                              I have the same issue (I think), although I have the latest version of inDesign installed.

                                               

                                              I have a document with custom swatches. At the moment I am replacing the English text with the German translation (that I have in a Word Document.). Everytime I paste a new section of the text to inDesign, it automatically adds a new version of one of my blue swatches (not the cyan that you had issues with). I didn't notice this in the beginning, but suddenly I had 110 versions of the same blue swatch, even though the text itself is black (both in Word and inDesign).

                                               

                                              Does ayone know how to resolve this issue? It's not a big thing for me to delete the swatches since they aren't even used, but it's still a bit annoying that I have to do it...

                                               

                                              /Lisa

                                              • 20. Re: Strange problem: Pasting text to InDesign CC2015 always adds cyan color
                                                rob day Adobe Community Professional & MVP

                                                Everytime I paste a new section of the text to inDesign, it automatically adds a new version of one of my blue swatches

                                                I think this is a different issue and isn't related to the new paragraph shading feature the OP was having a problem with.

                                                 

                                                When you paste text or an object that uses a named swatch that already exists in the document; the Color Type, Color Mode and color values have to be identical otherwise a new swatch will be created with a numbered suffix. Try using Paste Without Formatting rather than Paste.

                                                • 21. Re: Strange problem: Pasting text to InDesign CC2015 always adds cyan color
                                                  lisag34437394 Level 1

                                                  Ah, true - yes, this is probably related to something else.

                                                   

                                                  Unfortunately "paste without formatting" is not enabled :/ But I suppose it has something to do with the original formatting and me first copying/pasting the English text from inDesign to Word, then pasting it back to the inDesign-document. Oh well Thank you anyway!

                                                  • 22. Re: Strange problem: Pasting text to InDesign CC2015 always adds cyan color
                                                    rob day Adobe Community Professional & MVP

                                                    I've never liked the default where a new color is created when there's a conflict, so I use this AppleScript (OSX only) and assign it Command-V. It will use the document's version of the named swatch and delete the incoming version.

                                                     

                                                     

                                                    --------------------------------------------------------------------------

                                                    --When pasting an object with a conflicting color swatch changes the incoming swatch to match the document swatch

                                                     

                                                    tell application "Adobe InDesign CC 2014"

                                                        set myDoc to active document

                                                       

                                                        --get the list of document swatches before the paste

                                                        set currentColors to name of every swatch of myDoc

                                                       

                                                        paste

                                                       

                                                        --get a new list which would include duplicates

                                                        set newColors to name of every swatch of myDoc

                                                       

                                                        --find the duplicates and merge with the original

                                                        repeat with i from 1 to number of items in newColors

                                                            set c to item i of newColors

                                                           

                                                            --the duplicate has a space + 2 added to its name so get its name minus 2 characters

                                                            if c is not in currentColors then

                                                                set mergename to characters 1 thru ((count of characters of c) - 2) of c as string

                                                               

                                                                --merge with the original swatch

                                                                try

                                                                    merge swatch mergename of myDoc with swatch c of myDoc

                                                                end try

                                                            end if

                                                        end repeat

                                                    end tell

                                                    • 23. Re: Strange problem: Pasting text to InDesign CC2015 always adds cyan color
                                                      lisag34437394 Level 1

                                                      Ah, unfortunately I'm on a PC (maybe we can blame the PC for messing things up?!)

                                                      • 24. Re: Strange problem: Pasting text to InDesign CC2015 always adds cyan color
                                                        John@3cdp Level 1

                                                        I am having a similar issue to this. I have a custom swatch that is duplicating every time I paste something in. So I end up with multiples of the same swatch colour. I can delete unused as suggested, but it's just annoying that I have to do this on a regular basis.

                                                         

                                                        I have tried "zeroing out" the paragraph shading for my new docs and it "seems" to have solved this on new docs I create. However how can I remove this for existing documents? Any solutions?

                                                        • 25. Re: Strange problem: Pasting text to InDesign CC2015 always adds cyan color
                                                          ERC - Carolyn

                                                          I am having the same issue. Would love to hear about any resolutions.

                                                          • 26. Re: Strange problem: Pasting text to InDesign CC2015 always adds cyan color
                                                            Laubender Adobe Community Professional & MVP

                                                            Hi Carolyn,

                                                            I found yet another method by scripting to zeroing out the color "C=100 M=0 Y=0 K=0" by default.

                                                            It's written in ExtendScript (JavaScript), so this should work on Windows and Mac OSX as well:

                                                             

                                                            Have no document open and execute the following script:

                                                             

                                                            // ExtendScript script for InDesign CC 2015:
                                                            // When no document is open, you can change the default:
                                                            
                                                            // Example to change the default of paragraph shading to 20% Black:
                                                            app.textDefaults.paragraphShadingColor = app.colors.itemByName("Black");
                                                            app.textDefaults.paragraphShadingTint = 20;
                                                            
                                                            // After executing the script:
                                                            // If you add a NEW document, the "cyan" color will NOT be added to the document automatically.
                                                            // Instead 20% of Black is used as default for paragraph shading.
                                                            

                                                             

                                                             

                                                            Uwe

                                                            • 27. Re: Strange problem: Pasting text to InDesign CC2015 always adds cyan color
                                                              Andersson Level 1

                                                              The script is not working here. Mac OS X and InDesign 11.2.0.99.

                                                               

                                                              I tried it and even restarted InDesign but no change.

                                                              • 28. Re: Strange problem: Pasting text to InDesign CC2015 always adds cyan color
                                                                Andersson Level 1

                                                                I am working on a 64 page brochure. Before going to print I like to check my document and delete unused colors. The clients design guidelines doesn't allow any cyan colors. I can't just assume "aha that's the paragraph shading color". The only way of knowing it's not used if it's not there anymore.

                                                                 

                                                                Why can't the default colors for InDesign be named like this:

                                                                Black

                                                                Paper

                                                                Paragraph shade (can also be cyan)

                                                                This would be followed by the default colors as before 100% Cyan, 100% Magenta etc

                                                                • 29. Re: Strange problem: Pasting text to InDesign CC2015 always adds cyan color
                                                                  rob day Adobe Community Professional & MVP

                                                                  If you are not using paragraph shading at all, try this AppleScript (paste into Script Editor and run). It will set paragraph shading of all of the paragraphs and paragraph styles in the active doc to "Paper".

                                                                   

                                                                  tell application "Adobe InDesign CC 2015"

                                                                      tell active document

                                                                          set p to item 3 of every swatch

                                                                        

                                                                          set pstyles to all paragraph styles

                                                                          repeat with i from 1 to number of items in pstyles

                                                                              try

                                                                                  set paragraph shading color of item i of pstyles to p

                                                                              end try

                                                                          end repeat

                                                                        

                                                                          try

                                                                              set paragraph shading color of every paragraph of every story to p

                                                                          end try

                                                                          try

                                                                              set paragraph shading color of every paragraph of every cell of every table of every story of active document to p

                                                                          end try

                                                                      end tell

                                                                  end tell

                                                                  • 30. Re: Strange problem: Pasting text to InDesign CC2015 always adds cyan color
                                                                    rob day Adobe Community Professional & MVP

                                                                    Trying to assign "None" to the paragraph shading color property as value

                                                                     

                                                                    app.paragraphStyles[0].paragraphShadingColor = "None"

                                                                     

                                                                    will throw an error.

                                                                    So "C=100 M=0 Y=0 K=0" will stay with us for a long time, I suspect ;-)

                                                                     

                                                                     

                                                                    @Rob – a note about the scripting side:

                                                                    At least in ExtendScript I am not able to assign a different color to the paragraphShadingColor property of paragraphs[0], the "[No paragraphs style]".

                                                                     

                                                                    Uwe, if you are still following, I looked at this again today and it's true that No Paragraph Style is read only, but there does seem to be a round about way to set its paragraph shading property.

                                                                     

                                                                    Here is an annotated AppleScript, which sets No Paragraph Style's shading to [Paper]. If I run this on CC2015 with no doc's open it edits the normally read only [No Paragraph Style]. I'm sure you can translate to JS:

                                                                     

                                                                    tell application "Adobe InDesign CC 2015"

                                                                     

                                                                        ----the default Paper swatch is item 3 or [2] in all swatches

                                                                        set p to object reference of item 3 of every swatch

                                                                     

                                                                        ----No Paragraph Style is item 1 or [0] in all paragraph styles

                                                                        set nopara to item 1 of all paragraph styles

                                                                     

                                                                        ----No Paragraph style's properties are read only so we can't set the paragraph shading color

                                                                        ----but we can get it, which by default is the cyan swatch.

                                                                        set c to object reference of paragraph shading color of nopara

                                                                     

                                                                        ----if we delete and replace No Paragraph Style's shading color with "Paper"

                                                                        ----we have changed the shading property of the read-only No Paragraph Style

                                                                        if name of c is not "Paper" then

                                                                            set cp to properties of c

                                                                            delete c replacing with p

                                                                         

                                                                            ----re makes the default cyan swatch

                                                                            make new color with properties cp

                                                                        end if

                                                                     

                                                                        ----set the application text default

                                                                        set paragraph shading color of text defaults to c

                                                                    end tell

                                                                    • 31. Re: Strange problem: Pasting text to InDesign CC2015 always adds cyan color
                                                                      Laubender Adobe Community Professional & MVP

                                                                      Hi Rob,

                                                                      yes I'm still following, but will not to be able to test until tomorrow.
                                                                      I'm too busy right now…
                                                                      ( And was knocked out a bit last week by the flu. )

                                                                       

                                                                      Hi Andersson,

                                                                      hm, tested with my German version of InDesign CC-2015.2 v11.2.0.99 on OSX 10.9.3.
                                                                      And it worked there… The only thing I noticed—a side effect—was, that a new swatch "Schwarz" (German: "Black") was created, defined with 0 C, 0 M, 0 Y, 100 K.
                                                                      Maybe that's a problem with an English version InDesign. I'll test again tomorrow.

                                                                       

                                                                      Uwe

                                                                      • 33. Re: Strange problem: Pasting text to InDesign CC2015 always adds cyan color
                                                                        simonflynn

                                                                        This all begs the question: Who on Earth was ever using or needing Paragraph Shading?

                                                                        • 34. Re: Strange problem: Pasting text to InDesign CC2015 always adds cyan color
                                                                          Laubender Adobe Community Professional & MVP

                                                                          simonflynn wrote:

                                                                           

                                                                          This all begs the question: Who on Earth was ever using or needing Paragraph Shading?

                                                                          This question can be asked for a lot of InDesign's features. Even for the very basic ones. Different needs for different tasks I'd say. And paragraph shading is helpful for long document creation and is simplifying the formatting of text without using text cells or anchored text frames for the same purpose.

                                                                           

                                                                          I must admit that it could be even more helpful, if strokes and corner effects were added and if paragraphs holding tables aren't ignored.

                                                                           

                                                                          Regards,
                                                                          Uwe

                                                                          • 35. Re: Strange problem: Pasting text to InDesign CC2015 always adds cyan color
                                                                            Laubender Adobe Community Professional & MVP

                                                                            rob day wrote:


                                                                            Here is an annotated AppleScript, which sets No Paragraph Style's shading to [Paper]. If I run this on CC2015 with no doc's open it edits the normally read only [No Paragraph Style]. I'm sure you can translate to JS:

                                                                            Hi Rob, I finally had time trying out your AppleScript on my German InDesign CC 2015.4.

                                                                            Unfortunately it is throwing an error. Roughly translated from German:

                                                                             

                                                                            AppleScript Error
                                                                            Error number: 30477

                                                                            Unexpected value for "paragraph shading color".

                                                                            Swatch or string expected but recieved nothing.

                                                                            Engine: Default

                                                                             

                                                                            Nevertheless, after clicking the error message's OK button, the default shading has changed to "Paper".
                                                                            A new swatch "C=100 M=0 Y=0 K=0" was added to the bottom of the list of swatches.

                                                                             

                                                                            New documents will contain the new defaults. Old documents saved before running the script will keep the old defaults.
                                                                            So if I copy text from an old document to a new one that was created after the script run, the default paragraph style [Basic Paragraph Style] will be changed. That change can be observed by the added +-sign after its name in the Paragraph Styles panel.

                                                                             

                                                                            One could remove the +-sign by doing an click holding the alt key.

                                                                            That's ok, I think.

                                                                             

                                                                            Important note: Never assume that the order of colors in your Swatches panel is the order of colors everyone is seeing in their Swatches panel. For example, one could drag the swatch "[Paper]" to a different position, if no document is open.

                                                                             

                                                                             

                                                                            See my version with ExtendScript that is trying to do the same. I do not rely on the order of swatches, but I'm identifying the swatch I want to use by its universal name. I would recommend using the color "Black" and a tint of 20% for the default color of paragraph shading.

                                                                             

                                                                            The script will do nothing, if a document is open.
                                                                            And the script's action can be undone in one go.

                                                                             

                                                                            // ChangeTheDefaultColor-for-ParagraphShading-v2.jsx
                                                                            // Uwe Laubender
                                                                            
                                                                            /**
                                                                            * @@@BUILDINFO@@@ ChangeTheDefaultColor-for-ParagraphShading-v2.jsx !Version! Tue Aug 23 2016 15:04:34 GMT+0200
                                                                            */
                                                                            
                                                                            
                                                                            /*
                                                                                Changing the Default of inDesign with
                                                                                paragraphShading
                                                                                
                                                                                26. Re: Strange problem: Pasting text to InDesign CC2015 always adds cyan color
                                                                                Uwe Laubender | Feb 3, 2016
                                                                                https://forums.adobe.com/message/8457900#8457900
                                                                                
                                                                            */
                                                                            
                                                                            app.scriptPreferences.userInteractionLevel = UserInteractionLevels.INTERACT_WITH_ALL;
                                                                            
                                                                            app.doScript
                                                                                (
                                                                                
                                                                                main, 
                                                                                ScriptLanguage.JAVASCRIPT, 
                                                                                [],
                                                                                UndoModes.ENTIRE_SCRIPT, 
                                                                                "Change The Default Color for Paragraph Shading | SCRIPT"
                                                                                
                                                                                );
                                                                            
                                                                            function main()
                                                                            {
                                                                                /* Section where you can change the color and the tint. */
                                                                                
                                                                                // Do not change the name to "[Black]" or "[Schwarz]" or "[Noir]" etc.pp.
                                                                                // Leave it at "Black" for UI-Color: "[Black]", "[Schwarz]" or "[Noir]" etc.pp.
                                                                                
                                                                                // Alternative: "Paper" for UI-Color: "[Paper]", "[Papier]" etc.pp.
                                                                                
                                                                                var newShadingColorName = "Black";
                                                                                //var newShadingColorName = "Paper";
                                                                                
                                                                                // If you want to get 100% assign the default value:
                                                                                // -1 
                                                                                var newShadingTint = 20;
                                                                                //var newShadingTint = -1; // Gets you 100%
                                                                            
                                                                                /* End of section. */
                                                                                
                                                                                
                                                                                if(app.documents.length !=0)
                                                                                {
                                                                                    alert("ERROR:"+"\r"+"Close All documents and try again!");
                                                                                    return;
                                                                                }
                                                                            
                                                                                if(!app.textDefaults.hasOwnProperty("paragraphShadingColor"))
                                                                                {
                                                                                    alert("ERROR:"+"\r"+"Paragraph shading seems not to be supported with your version of inDesign that is:"+"\r"+app.version);
                                                                                }
                                                                            
                                                                                // InDesign's defaults for paragraph shading are:
                                                                                // app.textDefaults.paragraphShadingColor.name = app.colors.itemByName("C=100 M=0 Y=0 K=0");
                                                                                // app.textDefaults.paragraphShadingTint = -1;
                                                                                
                                                                                // IMPORTANT NOTE: The name "C=100 M=0 Y=0 K=0" could be different in different locale versions of InDesign
                                                                                // It's good with InDesign German, English-International, US, English
                                                                                // It's NOT GOOD with e.g. InDesign French!!
                                                                                
                                                                                var oldShadingColor = app.textDefaults.paragraphShadingColor;
                                                                                
                                                                                var oldShadingColorName = oldShadingColor.name;
                                                                                var oldShadingColorValue = oldShadingColor.colorValue;
                                                                                var oldShadingColorModel = oldShadingColor.model;
                                                                                var oldShadingColorSpace = oldShadingColor.space;
                                                                            
                                                                                app.textDefaults.paragraphShadingColor = app.colors.itemByName(newShadingColorName);
                                                                                app.textDefaults.paragraphShadingTint = newShadingTint;
                                                                                
                                                                                app.paragraphStyles[1].paragraphShadingColor = app.colors.itemByName(newShadingColorName);
                                                                                app.paragraphStyles[1].paragraphShadingTint = newShadingTint;
                                                                                
                                                                                if(app.colors.itemByName(oldShadingColorName).isValid)
                                                                                {
                                                                                    // Exchange shading color with new shading color:
                                                                                    // If that's possible. If not end the function immediately.
                                                                                    try
                                                                                    {
                                                                                        app.colors.itemByName(oldShadingColorName).remove(app.colors.itemByName(newShadingColorName));
                                                                                    }catch(e)
                                                                                    {
                                                                                        return
                                                                                    };
                                                                                };
                                                                                    
                                                                                // Add the replaced color again.
                                                                                app.colors.add
                                                                                (
                                                                                    { 
                                                                                        name : oldShadingColorName , 
                                                                                        colorValue : oldShadingColorValue , 
                                                                                        model : oldShadingColorModel , 
                                                                                        space : oldShadingColorSpace
                                                                                    }
                                                                                );
                                                                            
                                                                            
                                                                            };
                                                                            

                                                                             

                                                                            Thank you,
                                                                            Uwe

                                                                            • 36. Re: Strange problem: Pasting text to InDesign CC2015 always adds cyan color
                                                                              Laubender Adobe Community Professional & MVP

                                                                              Another issue I am seeing.


                                                                              Even if my script ran successfully, copying some text from e.g. TextEdit App (no formatting) to InDesign will add the swatch "C=100 M=0 Y=0 K=0" again, if it was removed before. So "C=100 M=0 Y=0 K=0" seems to be somewhere else as "active". Even if it is not used. One could remove "C=100 M=0 Y=0 K=0" again without problem after copying the text from a different app.

                                                                               

                                                                              This problem was mentioned in the German Adobe forum here:

                                                                               

                                                                              InDesign erstellt Cyan-Farbfeld beim kopieren

                                                                              ("InDesign adds Cyan swatch when copying")

                                                                              GrafikLVM | Sep 21, 2015

                                                                              https://forums.adobe.com/thread/1959077

                                                                               

                                                                              Regards,
                                                                              Uwe

                                                                              • 37. Re: Strange problem: Pasting text to InDesign CC2015 always adds cyan color
                                                                                Laubender Adobe Community Professional & MVP

                                                                                A workaround for the issue I see that unformatted text copied from e.g. TextEdit App through the clipboard will add the swatch "C=100 M=0 Y=0 K=0" is to enable "Paste Unformatted" in InDesign.

                                                                                 

                                                                                To do that:

                                                                                1. Change InDesign's preferences for the clipboard to paste text to "All Information".

                                                                                Do not use "Text only".

                                                                                2. Use the now functional "Paste Unformatted" feature when pasting text.

                                                                                 

                                                                                Then "C=100 M=0 Y=0 K=0" is not added to the Swatches panel.

                                                                                 

                                                                                Regards,
                                                                                Uwe