Tag Archives: Adobe

Illustrator Scripts for changing colors

Illustrator Scripts for changing colors

These are two scripts that are almost identical but one uses RGB colours and the other CMYK. For these to work correctly the Illustrator document needs to be put into the correct color mode (RGB or CMYK) from the File menu/Document Color Mode.
 
The parts of the scripts that you would need to change are at the top of the scripts. So for example in the CMYK variant of the script you would need to change one or more of the four values for the original color (the color that you are searching for) and the new color that you are replacing it with.
 
Be aware that this code is searching for paths and not images or text. For it to work with text it should have been converted to outlines before the code is run. The code could be enhanced to add this additional functionality. It would also be possible to add a CEP (HTML and JavaScript) user interface so that users could change the colors that way rather than directly in the script.
 
You will also see two flags:
				
					var changeFill = true;
var changeStroke = true
				
			
This are currently set so that both stroke and fill colors will be changed. Switching either of these to false will toggle that switch that setting off.
 
This is the CMYK variant:
				
					// Define the original color and the new color
var originalColor = new CMYKColor();
originalColor.cyan = 100;
originalColor.magenta = 100;
originalColor.yellow = 0;
originalColor.black = 0;
 
var newColor = new CMYKColor();
newColor.cyan = 0;
newColor.magenta = 0;
newColor.yellow = 100;
newColor.black = 0;
 
var changeFill = true;
var changeStroke = true
 
// Get the active document
var doc = app.activeDocument;
 
// Get all the top-level items in the document
var topLevelItems = doc.pageItems;
 
// Loop through all the top-level items
for (var j = 0; j < topLevelItems.length; j++) {
    // Check if the item is a path item
    if (topLevelItems[j].typename == "PathItem") {
        var fillColor = topLevelItems[j].fillColor;
        var strokeColor = topLevelItems[j].strokeColor;
        if(fillColor && changeFill){
            // Check if the fill color is the original color
            if (fillColor.typename == "CMYKColor" && fillColor.cyan == originalColor.cyan && fillColor.magenta == originalColor.magenta && fillColor.yellow == originalColor.yellow && fillColor.black == originalColor.black) {
                // Change the fill color to the new color
                topLevelItems[j].fillColor = newColor;
            }
        }
        if(strokeColor && changeStroke){
            // Check if the stroke color is the original color
            if (strokeColor.typename == "CMYKColor" && strokeColor.cyan == originalColor.cyan && strokeColor.magenta == originalColor.magenta && strokeColor.yellow == originalColor.yellow && strokeColor.black == originalColor.black) {
                // Change the stroke color to the new color
                topLevelItems[j].strokeColor = newColor;
            }
        }
    }
}
				
			

This is the RGB variant:

				
					// Define the original color and the new color
var originalColor = new RGBColor();
originalColor.red = 255;
originalColor.green = 0;
originalColor.blue = 0;
 
var newColor = new RGBColor();
newColor.red = 0;
newColor.green = 255;
newColor.blue = 0;
 
var changeFill = true;
var changeStroke = true
 
// Get the active document
var doc = app.activeDocument;
 
// Get all the top-level items in the document
var topLevelItems = doc.pageItems;
 
// Loop through all the top-level items
for (var j = 0; j < topLevelItems.length; j++) {
 
    // Check if the item is a path item
    if (topLevelItems[j].typename == "PathItem") {
var fillColor = topLevelItems[j].fillColor;
        var strokeColor = topLevelItems[j].strokeColor;
        if(fillColor && changeFill ){
            // Check if the fill color is the original color
            if (fillColor.typename == "RGBColor" && fillColor.red == originalColor.red && fillColor.green == originalColor.green && fillColor.blue == originalColor.blue) {
                // Change the fill color to the new color
                topLevelItems[j].fillColor = newColor;
            }
        }
        if(strokeColor && changeStroke){
            // Check if the stroke color is the original color
            if (strokeColor.typename == "RGBColor" && strokeColor.red == originalColor.red && strokeColor.green == originalColor.green && strokeColor.blue == originalColor.blue) {
                // Change the stroke color to the new color
                topLevelItems[j].strokeColor = newColor
            }
        }
    }
}
				
			

The scripts can be run by copying the code from this blog (just use the copy button on the top right) and saving either of them into files with a .js extension (for example ConvertColorRGB.js and ConvertColorCMYK.js). They can then be run from the Illustrator File/Scripts/Other Scripts menu.

Type 1 Font Support Ending

Due to the replacement of Type 1 fonts with OpenType, Adobe will no longer support the use of Type 1 fonts in its products from January 2023 onwards.

This means that Type 1 fonts will not be usable and will no longer appear in the fonts menu. Any previously installed Type 1 fonts will display as “Missing fonts”, and documents using Type 1 fonts will not be affected by embedded Type 1 data. 

Adobe Creative Cloud Support

While previous versions of Creative Cloud apps will support Type 1 fonts, newer releases will not. Users can obtain OpenType versions of Adobe-owned fonts through Adobe Fonts or by purchasing perpetual licenses from Fontspring

Non-Adobe Type1

Similarly, users who purchased Type 1 fonts not owned by Adobe should contact the font foundry to see if an upgrade path to OpenType is available.

However, converting Type 1 fonts to OpenType may produce sub-optimal results. Despite these changes, Acrobat will still handle PDFs with Type 1 fonts in the same way it has for over 20 years. 

Contact information: 

mpeters@creativeaddonshub.com

https://creativeaddonshub.com.

Associated Links:

Adobe PDF Base-14 Fonts

 

 

Hexachome Colors

The Hexachrome color system is a six-color printing process that employs the traditional four process colors (cyan, magenta, yellow, and black) as well as two additional colors (green and orange) to increase the colour gamut, or range of colors that can be printed. This enables a wider range of colors to be printed with greater accuracy and more realistic image reproductions. Commercial printing applications that use the Hexachrome system include packaging, brochures, and point-of-purchase displays. These colors are typically printed on a six-color press or with a special type of inkjet printer with two additional cartridges compared to the normal CMYK printers.

Using Hexachrome in Adobe InDesign

Hexachrome colours can be defined and used in a variety of ways in Adobe InDesign and their is similar functionality in products such as Adobe Illustrator.

Swatch Libraries

Adobe InDesign includes a built-in Hexachrome swatch library, which can be accessed by selecting “Swatches” from the “Window” menu. When the swatches panel is open, choose “Open Swatch Library” and then “Hexachrome” to access the relevant colour swatche.

Color Settings 

In the “Color Settings” dialogue box in InDesign, you can also define Hexachrome colours. This is accessed by selecting “Color Settings” from the “Edit” menu. Select “Hexachrome” from the “Working Spaces” dropdown menu in the dialogue box.

Custom Colors 

Using the “Color” panel, you can also create custom Hexachrome colours. Select “Custom Color” from the fly-out menu when you open the panel. Then choose “Hexachrome” as the colour mode and adjust the values of each of the six colour channels (C,M,Y,K,O,G) to achieve the desired colour.

Color picker 

You can also use the colour picker tool to select any colour you want, then select “Hexachrome” from the colour mode drop-down menu.

Summary of Hexachrome usage

Generally, once the Hexachrome colors have been defined, you can use them in your designs just like any other colour, by selecting them from the swatches panel or applying them to objects and text.

It is worth noting that it is not a widely used color system and many printers, software and tools only support the CMYK color space, making it harder to find specialized Hexachrome equipment and software.

What next?

If you are interested in discussing our consultancy and software development services further then please send an email to info@creativeaddonshub.com by clicking the button below:

Why Plugins Matter?

Plugging Plug-ins – Why Third-Party Software Matters

Any professional racing driver will tell you that there’s no such thing as too much power.  Give them a new, 1000-horsepower engine and after 5 laps, they’ll pull into the pits and say:  “Great, but can you give me 1100bhp?”   It’s just the same with software – especially software that’s as versatile as Adobe Acrobat and CC products such as Adobe InDesign, Adobe Illustrator and Adobe Photoshop.

The Inevitable Limitations of Software Applications

No matter how powerful, flexible or easy-to-use the application, as soon as users get to grips with it, they’ll find it doesn’t quite do exactly what they want it to.  Or they’ll want it to be just that bit easier to do a certain function or perhaps be able to batch functions together. This isn’t greed, or customers being niggly – on the contrary, it’s actually a compliment that the original application is proving useful.  It simply underlines that there’s no such thing as the perfect program.

Bridging User Needs with Third-Party Solutions

Users often don’t express their exact needs initially. Instead, they highlight desired improvements to existing solutions. This scenario opens opportunities for third-party developers and their plugins. These developers typically engage closely with user communities, such as forums, to understand their needs. Questions like “How can I do this?” or “Is there a tool for that?” signal potential market gaps.

For instance, repeated requests to mask sensitive information in PDF documents indicate a demand for new solutions. This was the case for Mapsoft. By aligning closely with the Adobe user community, Mapsoft identified and filled such needs, expanding its range of plugins.

Among its offerings, Impress Pro stands out. This plugin allows adding text stamps to documents, serving as watermarks or headers and footers. Other innovative solutions include MaskIt, for hiding confidential content, and DogEars, a tool that marks pages for easy reference, akin to a physical bookmark. Additionally, TOCBuilder offers the creation of a linked and printable table of contents, enhancing document navigation.

So what should you look for in a third-party developer?

Evaluating a Developer’s Endorsement and Partnerships

Firstly, consider if the developer is endorsed by the main vendor’s partner programme. This is crucial. For instance, Mapsoft, an Adobe Business Partner, boasts over 30 years of experience developing plugins for Adobe products.

Assessing Product Integration with Main Vendor’s Technology

Secondly, evaluate how the developer’s products integrate with the main vendor’s technology. Products should be developed using the main vendor’s core technology to ensure reliability and seamless functionality. Mapsoft exemplifies this by licensing A dobe’s core technology for their plugins and customized products.

Opportunities for Product Evaluation

Thirdly, check if the product can be evaluated before purchase. This is vital to ensure it meets user needs. Developers confident in their solutions typically offer evaluation versions. Mapsoft, for example, provides free evaluation versions of all their plugins on their website.

Developer Support and User References

Finally, consider the developer’s support and the availability of user references. This indicates a long-term commitment to quality and customer satisfaction. With over 30 years in the sector and partnerships with high-profile companies like Network Rail, Xerox, and Hallmark Cards, Mapsoft demonstrates its expertise and dedication. They also offer one year of free support for their software solutions.

Conclusion

By keeping these points in mind, you can ensure you choose effective and reliable plugins that enhance your main application, streamline tasks, and add valuable features and functionality.

Contact info:

mpeters@creativeaddonshub.com

https://www.linkedin.com/in/mpmapsoft/

https://creativeaddonshub.com

 Related Links: