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;
}
}
... View more