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

How do I remove useless color options from this dropdown?

Community Beginner ,
Apr 18, 2024 Apr 18, 2024

Copy link to clipboard

Copied

I am marking up and editing an old, poorly written FM document and I need to highlight numerous different kinds of problems in the document with different colors. I have absolutely no use for these non-colors taking up room in this dropdown:

 Screenshot 2024-04-18 145510.jpg

Screenshot 2024-04-18 145710.jpg   Screenshot 2024-04-18 145752.jpg

Does anyone know how to delete these useless color choices?

 

Thanks!

Views

258

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

correct answers 1 Correct answer

Community Expert , Apr 18, 2024 Apr 18, 2024

Most of the time, these RGB prefixed colors are added by graphics imported into FrameMaker. So when you delete them, they may return. If you are sure that there are no colors with these names applied to native FrameMaker objects, you can use the script below to delete them. If you delete a color applied to a native FrameMaker object (for example, a paragraph), it will be replaced with Black.

 

To run the script below, copy and paste it into a plain text document and save it with a .jsx extension

...

Votes

Translate

Translate
Community Expert ,
Apr 18, 2024 Apr 18, 2024

Copy link to clipboard

Copied

Most of the time, these RGB prefixed colors are added by graphics imported into FrameMaker. So when you delete them, they may return. If you are sure that there are no colors with these names applied to native FrameMaker objects, you can use the script below to delete them. If you delete a color applied to a native FrameMaker object (for example, a paragraph), it will be replaced with Black.

 

To run the script below, copy and paste it into a plain text document and save it with a .jsx extension. Then open your FrameMaker document, and choose File > Script > Run, and select the script. Alternatively, you can add it to the Script Library so you can run it from the panel (File > Script > Catalog).

 

#target framemaker

main ();

function main () {
    
    var doc;
    
    doc = app.ActiveDoc;
    if (doc.ObjectValid () === 1) {
        processDoc (doc);
    }
}

function processDoc (doc) {
    
    var regex, color, nextColor;
    
    // Regular expression for colors that start with RGB.
    regex = /^RGB/;
    
    color = doc.FirstColorInDoc;
    while (color.ObjectValid () === 1) {
        nextColor = color.NextColorInDoc;
        if (regex.test (color.Name) === true) {
            color.Delete ();
        }
        color = nextColor;
    }
}

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 ,
Apr 18, 2024 Apr 18, 2024

Copy link to clipboard

Copied

Tremendous. THANK YOU!

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 ,
Apr 19, 2024 Apr 19, 2024

Copy link to clipboard

Copied

If any of these fix your issue, please mark it as Correct to help others.

-Matt Sullivan
FrameMaker Course Creator, Author, Trainer, Consultant

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
New Here ,
Aug 23, 2024 Aug 23, 2024

Copy link to clipboard

Copied

Hello Sir. I tried this script and it appears to run but the random RGB values are still in my color list. Has this been updated or maybe I missed a step or detail? Thank you!

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 ,
Aug 23, 2024 Aug 23, 2024

Copy link to clipboard

Copied

In the first line of Rick's message, he mentions that if the colors are coming from an imported graphic, they'll keep coming back.

MattTechCommTools_0-1724432684825.png

 

-Matt Sullivan
FrameMaker Course Creator, Author, Trainer, Consultant

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 ,
Aug 23, 2024 Aug 23, 2024

Copy link to clipboard

Copied

LATEST

If the RGB clutter is due to an imported object, such as a DWG or DXF file (but probably others as well), the Color Catalog will continue to get polluted as long as those objects are there.

My impression is that this is something the import filter is doing, and can't be overriden.

When I had the problem in the past, I'd try to identify the offending object, and then re-render it to eliminate the color defs (which usually weren't being used anyway), perhaps change the color model to greyscale & re-save as EPS (I'd use SVG or PDF today).

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 ,
Apr 18, 2024 Apr 18, 2024

Copy link to clipboard

Copied

See also this older discussion: Deleting Color Definitions

which may provide hints, esp. if the colors keep coming back.

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 ,
Apr 18, 2024 Apr 18, 2024

Copy link to clipboard

Copied

Thank you about twenty times over!

 

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