Illustrator Scripting :: Creating Color Swatch Legend

Feb 24, 2012

I've been looking for scripts online that would create a color swatch legend to list the colors used in my illustrator file.  I found this (see below) and tweaked it to place properly on my particular page, but it adds everything in my swatches panel to the legend.  Ideally, I'm looking for a piece of script to add that would only add used swatches to the legend, or a script that would only add spot colors to the legend. 
 
var docRef=app.activeDocument;
var SwatchBoxSize=24;
var swatchBoxSize=parseFloat(SwatchBoxSize);
var swatchBoxTop=swatchBoxSize+314;

[Code] ......

View 2 Replies


ADVERTISEMENT

Illustrator Scripting :: Getting Used Spot Colors In Color Legend On MAC JS Or Applescript

Mar 23, 2012

I've been looking around for a script that will take the used spot colors in a document and place them in a predetermined spot. I've came across several posts about this, such as the COLOR CHIPPER although I think it's focus was on swatches. What is confusing is the part of making New CMYKColor or RGB or if I even need to do that. I've looked at other posts and the Adobe docs, but none seem to work. Adding the text isn't difficult, it's getting these spot colors to reflect what's in the document that is. From what I'm seeing now:
 
I may have to use some other type of script such as Applescript to get rid of unused swatches first throught the actions panel, but I'm not sure.I could possibly use the getByName method to call out the specific rectangle and the and relative callout with the appropriate color instead of having to position everytime. 

View 9 Replies View Related

Illustrator Scripting :: Get Active Document  Swatch Color And Its Value?

Aug 13, 2013

i want to get the swatch color of active document . i use 3 to 4 colors both cmyk and pantone which is in swatches now i want to get their values using script.

View 1 Replies View Related

Illustrator Scripting :: Batch Change Color Swatch Name In EPS Files

Mar 20, 2012

I have a couple thousand AI authored EPS files with a specific swatch name (SpotBlack) that I would like to rename (black) -- is there any method to do this en masse, preferrably outside of Illy using a text editor?

View 7 Replies View Related

Illustrator Scripting :: How To Read Swatch Used For Fill Color Of A Page Item

Mar 21, 2012

Is there a way to read the swatch used for fill color of a page item?
 
I can read the fill color but I can't read if the color is a global swatch.

View 2 Replies View Related

Illustrator Scripting :: How To Determine Swatch Pattern Color Width And Height

Dec 31, 2012

I have an AI file containing seamless pattern swatches.I'd like to get each swatch vectors (ie : access the swatch groupItem). It's doable when clicking on the swatch panel and dragging the swatch on the document, or even double clicking the swatch in the swatches panel, I'd like to do it with javascript.
 
how to access swatch patterns properties.

How to access the swatch properties, like when double clicking on the swatch in the swatches panel, how to "simulate" a drag & drop of the swatch to the document, I'll take it too, though I think it is not the most convenient way to do.

View 7 Replies View Related

Illustrator Scripting :: Importing Color To Swatch Library From Text File

May 19, 2010

I have a large list of custom colors in Excel that has the color name and CMYK breakdown of each color. I'm looking for a way to import this information to create a custom Color Swatch Library. That will have the name of the color and the CMYK breakdown. So that I can easily use in Illustrator and Photoshop. Is there any way or application in doing this with out manually entering the information and creating a new library?

View 7 Replies View Related

Illustrator Scripting :: Apply Every Swatch Library Color To Path Items On Page?

Oct 1, 2012

I'm trying to write a script that applies a single swatch to a single path item and repeat for every swatch that is currently contained in the swatch library. This script that I have written is only applying the last swatch in the swatch library to every path item on the page. Currently I'm more concered with getting each swatch that is currently in the swatch library to be applied at least once before worrying about applying the same patch to any extra number of patch items compared to the swatches.length.

// Apply every swatch library color to path items on a page
if ( app.documents.length > 0 && app.activeDocument.pathItems.length > 0 ) {
doc = app.activeDocument;

[Code]....

View 11 Replies View Related

Illustrator :: Scripting - How To Remove Swatch In CS5

Oct 10, 2012

Swatches Swatches Read-only. The swatches in this document.
 
Deletes a swatch from the current document
Set appRef = CreateObject("Illustrator.Application")
Set documentSwatches = appRef.ActiveDocument.Swatches
Set swatchToDelete = documentSwatches(5)
swatchToDelete.delete
 
How am I supposed to be able to make changes to the swatches collection - it is read only...
 
Not supprisingly I have failed to implement this in C-sharp

View 5 Replies View Related

Illustrator Scripting :: How To Replace One Swatch With Another

Feb 11, 2014

Is there anyway in JavaScript to replace one swatch with another?
 
I've seen other posts where similar questions have been asked, but the solution seems to involve iterating over all the pageItems, testing and then changing the fillColor.
 
All I want to do is delete/replace a specific color. Say replace Yellow with Green.
 
Is there a way of doing this without recursing through all of the page items?

View 3 Replies View Related

Illustrator Scripting :: Get Swatch Name For Character?

Feb 28, 2012

I'm needing to loop through each character of a text frame and check the color of each character.  Is it possible to get the swatch name of each character?  Or can you only get the red, green, blue values?
 
I've been experimenting with:
 
app.activeDocument.textFrames[0].characters[3].characterAttributes.fil lColor.typename;
// Returns SpotColor
 
But I can't figure out how to get the swatch name of the character this way?

View 2 Replies View Related

Illustrator Scripting :: How To Call Swatch From The Library

Jul 20, 2012

I'm writing a script to create a new AI document with a restricted swatchbook. The designer is supposed to use only the swatches/inks provided by this script. So far I was able to delete all current swatches and add a CMYK or RGB spotcolor swatch.
 
var inkt02 = app.activeDocument.spots.add();
inkt02.name = 'inkt 2';
inkt02.colorType = ColorModel.SPOT;
var kleur02 = new CMYKColor();
kleur02.black = 10;
kleur02.cyan = 80;
kleur02.magenta = 0;
kleur02.yellow = 90;
inkt02.color = kleur02;
var newSpotColor = new SpotColor();
newSpotColor = inkt02;
newSpotColor.tint = 100;
thePallet.addSpot(newSpotColor);
 
Often we will be dealing with Pantone colors. No need to define these, as they are inside AI already, right? But how to call them from the library? I'm new to ExtendScript.

View 6 Replies View Related

Illustrator Scripting :: Convert CSV To Swatch Library?

Aug 4, 2012

I have a list of 300+ colors that I need to make into a swatch library for Illustrator. The data looks like this:
 
GREEN GRASS,127,187,0
PALE YELLOW,241,235,135
LIGHT YELLOW,238,231,93
DAFFODIL,249,231,21
MOONBEAM,249,223,22
etc.
 
It's RGB I think. In any case, I am just starting with Illustrator and I know NOTHING about scripting. these colors into a swatch library? I am getting a migraine just thinking about putting them in one by one.

I found something here, but that didn't work for me. I get an error on processing on line 75. [URL] ....
 
Error 24: app.doScript is not a function, Line 75 _> app.dpScript(speakThis, 1095978087); //AppleScript.
 
I get as far as choosing the csv file, and then I get the error. I think this outputs as CMYK, but not sure.

View 23 Replies View Related

Illustrator Scripting :: Create A Duplicate Gradient Swatch

Aug 5, 2013

I'm trying to challenge myself here, I want to create a copy of every gradient in the active document and give it an assigned name like "Batman 1" "Batman 2" ect.
 
I can add new gradients and set their stop colors ect but I can't figure out how to create a perfect copy of the gradient in the swatch library.
 
I've been looking and the only thing I found that comes close was an older script that's only compatibale with CS. In this they're copying EVERYTHING I just wanna stick to gradients at the moment. Here's the link: [URL]
 
I looked to this as an example of how to do something like this but since it wont work with CS6 I cant really experiment or tinker to figure out how it works.

View 24 Replies View Related

Illustrator Scripting :: How To Place A Swatch Pattern On A Layer

Jan 1, 2014

I recently created a script that reads the layer names of an Illustrator file, and uses the name to identify a swatch to use to pattern all elements on that specified layer. The script works well, and is a real time saver for our mapping staff, but it requires duplicate swatches to exist, where the only difference is their colour.

To improve the script I want to duplicate a swatch and modify its' colour before applying it to a specific layer. I think the only way this can be done is via the "placedItems" command. So the code I'm trying to write looks likke this:
 
for(var s=0; s<slib.length; s++){                                // search swatch library
    var pat=slib[s].name;                                             // get swatch name

[Code]...
 
However I'm struggling to find the correct syntax to make this work.

View 2 Replies View Related

Illustrator Scripting :: Adding Lab Colors To Swatch - Not Implemented

Jan 14, 2013

I tried to add a LabColor with an Illustrator script.
 
function addLabColorToSwatch(L,a,b,swatchName){
var color = new LabColor();
color.l = L;
color.a = a;
color.b = b;
 var swatchgroup = app.activeDocument.swatchGroups.add();
swatchgroup.name = "test swatchgroup from jsx script";
[code]....
 
The script crashes on the Line  'swatch.color = color;' with "Error 1202: Not implemented"..This seems to a bug. I allready filed it.

View 5 Replies View Related

Photoshop :: Creating A Color Swatch From Some Random Image

Apr 15, 2004

I read in this magazine a week ago about making a swatch from an image. I forgot how it was done.
for example, you find an image online and like the color scheme. You can do create a new swatch that has all the colors in that image only.

View 13 Replies View Related

Illustrator SDK :: Creating Custom Swatch Panel?

Aug 9, 2012

I want to create a custom color swatch panel for Illustrator. But I cant figure out a way to add swatches to the panel and drag/drop them into file.

Any example or the steps required to build such a panel. I've created a panel using CS Extension builder but cant figure out how to populate it with swatches.

View 4 Replies View Related

Illustrator :: Create A Shape With Pantone Color And Then Decrease Opacity In Color Swatch Palette

May 30, 2013

When I create a shape with a Pantone Color and then decrease the opacity in the color swatch palette, then go to my swatches palette and select "Select All Unused Colors"  it highlights the pantone color being used in the file.  In previous version, it never did this.   This is for CS6.  Any know fix for this?

View 2 Replies View Related

CorelDRAW Graphics Suite X5 :: Printing Color Swatch Sheets - Macro Keeps Creating Funky Page Size

Mar 7, 2012

My CorelMacros.CreateColorSwatch macro has stopped dumping the swatches into whatever blank Letter-sized document I have open (which is how it used to work) and instead it is creating a new document, at 4.25" wide x 7" high, and dumping the swatches into that. Using Pantone Solid Coated, but it's doing this regardless of what palette I choose.

There is no option in the Macro's dialog box to alter or even instantiate a page size, and I cannot find in the code of the macro where to set this variable.

View 5 Replies View Related

Illustrator :: How To Color Pattern With Swatch Color

Feb 14, 2013

I made a pattern in illustrator c6 (lets say simple dots in rows) and I want to color this dots with a swatch (which means a specific color that changes automatically when I change this particular swatch). It does change the color but it also causes a lot of troubles, it makes weird compound paths and illustrator gets very slow...

View 2 Replies View Related

Illustrator :: Redefine Swatch Color?

Jul 19, 2012

How do I redefine a swatch color?

View 4 Replies View Related

Illustrator :: CS6 Color Swatch Panel?

Aug 30, 2013

We just got illustrator cs6 in our office. I was given a book and told to learn it, but WOW, it is not easy.
 
I feel like an idiot asking a question that should be basic, but I swear I have been seaching all over the place and can't find the answer.

View 2 Replies View Related

Illustrator :: Default CC Color Swatch?

Feb 9, 2014

Is it possible to make changes to the default color swatch and have those changes appear as the default color swatch whenever you open Illustrator CC?

View 1 Replies View Related

Illustrator :: How To Get Swatch Color Changes To Update In Gradients

Jul 10, 2012

When I drop a swatch color on a gradient, it doesn't link to the swatch color like in a solid fill.Nevermind the UI inconsistency with this behavior, since Adobe probably doesn't care, but how do I get around this?
 
Creating a Swatch from the gradient is not a solution for me, as I use the same base color in different gradients.

View 2 Replies View Related

Illustrator :: Create Hex Color Swatch Chart For Web?

Oct 13, 2009

we have a website concept in Illustrator CS3, with named swatches for all colors. I'm wondering if there is an easy or 'semi-automated' way to generate a chart of the swatches we are using, showing there hex values?
 
I know I could draw out a bunch of boxes, fill them with the swatch colors, and manually look up and type in the hex values for each. But this would take a LONG time, as there are a number of color variations.

View 15 Replies View Related

Illustrator :: How To Create New CMYK Color Swatch

Sep 26, 2013

Whenever I try to create a new CMYK color swatch it automatically opens pattern swatch name panel. Why won't it let me create a color swatch?

View 4 Replies View Related

Illustrator :: Saving Color Groups As ASE Swatch Libraries

Jul 9, 2013

Is there a way to save an lllustrator color group as an ASE swatch library? When I try to do this, the entire library, including all the default swatches, are saved, when all I want are the particular swatches I've added to a new colour group. I want to be able to save swatch libraries for various clients, then be able to access them in InDesign and Photoshop as well. Or alternatively, is there a way to remove unwanted swatches from a swatch library once it's been saved? (Using CS6 on a Mac running 10.8.4)

View 5 Replies View Related

Illustrator :: Hexadecimal Swatch Palate Or Color Picker For CS5?

May 26, 2013

Is there a Hexadecimal Swatch Palate or Color Picker for Illustrator CS5? If not -- in CS6 - as I'm thinking of upgrading.But it seems like such a thing is so basic, surely I'm just missing it?

View 11 Replies View Related

Illustrator Scripting :: Creating Shortcuts For Scripts?

Mar 9, 2012

The best way I have found is loading script file in scripts folder so it is in menu creating an action, insert menu item in action then assigning the action to an F key. however, everytime I restart illustrator I have to reset this. Any persistent way to do this?

View 3 Replies View Related

AutoCAD Architecture :: How To Enlarge Legend Key Squares In Display Theme Style Legend

Mar 14, 2012

How do you enlarge the legend key squares in a display theme style legend? Can you add schedule information to this legend like the total SF of a particular display theme style?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved