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

How to change default delete Swatch to None

Explorer ,
Mar 17, 2021 Mar 17, 2021

Copy link to clipboard

Copied

When option-clicking the trash can to delete a swatch, is there a way to change the default replacement swatch color to None instead of Black? If not, please vote. Thanks.

TOPICS
How to

Views

205

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
Community Expert ,
Mar 24, 2021 Mar 24, 2021

Copy link to clipboard

Copied

No, but your request is interesting. What are you trying to accomplish? What problem are you trying to solve?

Mike Witherell

Votes

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
Community Expert ,
Mar 24, 2021 Mar 24, 2021

Copy link to clipboard

Copied

You can do it via scripting. You could assign this to a key command:

 

app.strokeFillProxySettings.fillColor.remove(app.swatches.itemByName("None"))

 

Votes

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
Community Expert ,
Mar 24, 2021 Mar 24, 2021

Copy link to clipboard

Copied

Sorry, should be this—in case there is a stroke selected:

 

 

 

if (app.strokeFillProxySettings.active == 1181314156) {
	app.strokeFillProxySettings.fillColor.remove(app.swatches.itemByName("None"))
    app.strokeFillProxySettings.fillColor="None"
} else {
    app.strokeFillProxySettings.strokeColor.remove(app.swatches.itemByName("None"))
    app.strokeFillProxySettings.strokeColor="None"
}

 

 

Before and after run:

 

Screen Shot 28.pngScreen Shot 29.png

Votes

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
Community Beginner ,
Mar 26, 2021 Mar 26, 2021

Copy link to clipboard

Copied

LATEST

Thanks for the replies... and that script will no doubt come in handy! But... (there's always a but, right?)

 

What I want to be able to do is select multiple swatches in the Swatches panel and option-click the trash can... bypassing the 'replace with color' prompt... and just replace with None (instead of the current defualt of Black).

 

We get a lot of files that have colors with names like 'notes-dnp,' 'comments – DO NOT PRINT,' etc. Some files will have 4-6 swatches like that... for some unexplainable reason!

 

Even after completely cleaning/inspecting a file, the swatches behave as if they're in use and aren't highlighted when I try 'select all unused colors' (or run a clean up script*). Times when I used the 'find color' option, I found them used as (inactive) parapgraph shading or, in most cases, not in use anywhere. So the script won't work because there's nothing to select.

 

Bottom line, I'm confident the colors aren't in use (and even if they are I don't want them to print) so I just want them... gone. Being able to select all of the swatches at once and option-clicking to replace with None would save a ton of time.

 

Hope that explains it better (or probably too much!)

Thanks!!!!

 

*clean up script removes all unused masters, layers, swatches. Used to include unused styles (paragraph, character, object) but it wasn't seeing greps or nested styles (and I don't know enough javascript to fix it) so I do those manually when needed, which isn't often because most of the files we get don't use them anyway.

Votes

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