Illustrator Scripting :: Typename Of The Filled Color?

Jul 18, 2012

I am trying to use the property "typename" with the fillcolor. I am using following statement:
 
grp.compoundPathItems.index(j+1).pathItems.index(0).fillColor.typenam e
 
It'll give error i.e. access of undefined property typename.
 
Is there any way of finding the typename of fillcolor?
 
Actually, I want to get the type of fillcolor used in pathitem, i.e. is it "GradientColor", "PatternColor" or "SpotColor".

View 4 Replies


ADVERTISEMENT

Illustrator :: Text Box Will Not Come To Front Of Color-filled Box

Feb 20, 2013

what I do, my text box will not come to the front of my color-filled box. Is this a pc bug? I am used to working on Illustrator with a mac and experience little problems. I am using CS5 with Windows 7.

View 3 Replies View Related

Illustrator :: Object Not Properly Filled With Color?

Sep 12, 2013

I'm drawing some objects in illustrator and when I stroke it, it's clear that the color is not staying or not matching the object. I took a picture of it.. I drew a lot, but this is the first time that it is happening.

View 4 Replies View Related

Illustrator :: Recolor Artwork Dialog Not Replace Color Of Objects Filled Or Stroked With Pure Black

May 24, 2012

The Recolor Artwork dialog does not replace the color of objects filled or stroked with pure black, either CMYK or RGB. (Yes, with the Recolor Art checkbox selected.) The dialog will replace any other color, but not black. Not even a manually created rich black. Manually selecting another color from the Color or Swatches panel does change the object's fill or stroke.
 
This happens with both CS6 and CS5 under Windows 7 x64. I reported it as a bug on the prerelease site. Also not sure if bug reports are still being read for the released version.

View 6 Replies View Related

Illustrator :: How To Make Shape Transparent So Shape Filled With Background Color

Jun 11, 2013

I have two layers on the bottom I have text, and on the top I have a shape.
 
How do I make the shape transparent so the shape may be filled with the background color?

View 5 Replies View Related

Illustrator Scripting :: Apply Current Fill Color To Stroke Then Adjust That Stroke Color's Build?

Apr 9, 2013

I'm trying to figure out a way to automate a simple, yet repetative process I do countless times a day. Ideally, I'd like to tie it to a keystroke to speed up my workflow.
 
I work on line art and colorways for footwear, so the way I'm coloring these shapes and strokes break apart the different materials and pieces of the shoe.
 
While coloring line art, I work with Pantone spot colors as fills for closed path objects. I then have to manually apply that same color to the stroke, set the stroke to 0.5px weight, convert that spot stroke color to CMYK, and add 15% to the K value.
 
I found some code in an older post for applying the actively selected object's fill color to the stroke, but I'm having but I'm having trouble with the next step of figuring out how to take that spot stroke color and convert it to a CMYK build that I can then add 15% black to. Is this something that's even possible? I've spent about an hour playing with the script and have only had luck matching the fill color or turning the stroke white.

View 13 Replies View Related

Illustrator Scripting :: Color Change To Various Types?

Feb 6, 2013

I am trying to change the color of all items on and under a specific layer.I have been successful changing the color of specific types of objects (paths), but I need to accommodate all the types on the layer and sub layers.
 
I can recurse to as many sub layers as I expect, but how do I accommodate the page Items, path Items, group Items, compound Path Items, etc.I was thinking of pushing everything to an array, but I have no experience with arrays...

View 3 Replies View Related

Illustrator Scripting :: Changing Color Of A Selection To HEX

Sep 6, 2012

I'm new to illustrator scripting (but not to javascript or programming. I have an AI file that has multiple layers. each layer has several items that are supposed to be of same color. I have an array of HEX values.

I would like to loop over all items in a single layer, select them and change their color to some given HEX. Once that works, I will run on all HEX entries in array and save each variation in a separate PNG file.
 
For the first part i wrote some script (see below), but i do not see any change in the file after i run the script. No errors and no change. I run the script once i select all items in a specific layer.
 
My code:

function hexToRgb(hex) {
    var result = /^#?([a-fd]{2})([a-fd]{2})([a-fd]{2})$/i.exec(hex);
    return result ? {
        r: parseInt(result[1], 16),
        g: parseInt(result[2], 16),
        b: parseInt(result[3], 16)

[Code] ......

View 3 Replies View Related

Illustrator Scripting :: Eye Dropper Or Color Sampling?

May 2, 2012

I'm trying to make a script to transform shape by a value of below object.

(look sample image below)

And I'd like to know how to sample color from gradient-mesh or bitmap photo.
 
 Does illustrator script have eyedropper or color sampling tool?

View 3 Replies View Related

Illustrator Scripting :: Color Change Command In JavaScript

Feb 4, 2013

I managed to write this javascript. It automatically changes the colors from one swatch (byName) to another (byName) in my opened illustrator file. But if this one color doesn't exist as a fill or outline color in a file, I get an error message, because the script can not detect the color. The script stops. I am working on a batch of Illustrator files with 3 colors to change, but some files contain just 1 or 2 of the colors.Is there a command for javascript which says: "Only change the color, if the color appears"?

Here is the script:
 
var docRef = app.activeDocument;
with (docRef) {
var findColor = swatches.getByName('TSB Dark Blue').color;
var replaceColor = swatches.getByName('TSBDB').color;
[code]....

View 2 Replies View Related

Illustrator Scripting :: Syntax To Check Pantone Color?

Aug 16, 2013

Syntax to check pantone color

eg (list.fillColor=="[CMYKColor]")

like that how to find pantone color and how to get the name of the pantone used

View 3 Replies View Related

Illustrator Scripting :: Raster-item Didn't Get Color

Mar 22, 2012

I have written a small application in .NET that gives color to Illustrator files.I have a layer with 100 color items (paths with a fillcolor). Each one has a unique name. Through that name my program looks them up, takes the fill color and applies that color to another path.Recently there was a change in Design, the drawings that I had to provide of a Fillcolor were no no longer pathitems but rasteritems (imported from photoshop). I thought ok no problem instead of setting the Fillcolor property I'll use the Colorize method on the rasteritems. It worked fine but now and then I came across a situation where raster-item didn't get the color. After digging in to it I saw that it was because some colors are Pantone colors and the colorize method on rasteritems only takes RGBColor or CMYKcolor objects. How to do it with the pantone colors?

View 1 Replies View Related

Illustrator Scripting :: Change Overprint Of Color With Applescript

May 4, 2012

I want to overprint a PMS colors using Applescript. I though if I changed the property of the selected items fill color from (fill overprint:false) to (fill overprint:true) it would work. This doesn't seem to change a thing.
 
This is the script I am currently using:
 
script ChangeOverprint
tell application "Adobe Illustrator"
local docRef

[Code]....
 
This is the picture of a simple document I created. The elipse has fill overprint:true. The polygon has filr overprint:false. The original value for the property fill overprint was false. I changed it in the script to true. Which the log shows it changed.

View 1 Replies View Related

Illustrator Scripting :: How To Fill Gradient Color In Textframe

Sep 3, 2013

I am working with scripting in Ai, fill gradient color in TextFrame. I search in this forum but the other topics fill color to path or line. For now, I can make a gradient color, but I don't know how to apply it to textframe.

View 6 Replies View Related

Illustrator Scripting :: How To Show The Color Picker Dialog

Feb 22, 2014

how to show the color picker dialog in Illustrator programmatically?

In photoshop that's really easy, just:
 
app.showColorPicker(true);
 
In Illustrator I couldn't find any reference to such a method or other possibility to show the dialog programmatically, that you would normally get when double clicking on the fill color square within Illustrator.
 
Is that possible by using app.executeMenuCommand or some other method?
 
I am writing a script that opens the color picker dialog in reaction to a click on a button. I want to be able to get the chosen color and use it within the script.

View 21 Replies View Related

Illustrator Scripting :: How To Find Out That Art Item Has Spot Color

Jul 4, 2012

I have a number of art items on a document, some of them are filled with spot colors and some of them are with process color.Is there any method by which I can find out which color type(spot or process) is applied to the selected art item?

View 4 Replies View Related

Illustrator Scripting :: Select Same Fill And Stroke Color

Aug 8, 2013

Select same fill color with java script and stroke color tool.

View 1 Replies View Related

Illustrator Scripting :: Any Way To Select TextFrames That Only Have A Fill Color

Mar 11, 2013

I have a script that will select text Frames, but I have come into a situation where I need to exclude any text frames that do not have a fill color. I do not see a filled Boolean property for character attributes or text Frames. 
 
This is what I used to select all text on all visible and unlocked layers. I dont see a way to exclude textframes that have no fillcolor.
 
if (app.documents.length > 0 ) { 
var doc = app.activeDocument;   
var numTextFrames = 0;   
for (  i = 0; i < doc.textFrames.length; i++ ) {
try { 
textArtRange = doc.textFrames[i];
textArtRange.selected = true;
} catch (e) {}        }    }

View 6 Replies View Related

Illustrator Scripting :: How To Set Color For Each Selected Object Via Eyedropper

May 30, 2013

When I run the script for an object selection, I want each object to have its color set to the underlying color as if I had used the eyedropper tool.  Is this something that can be scripted?

View 1 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 :: 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 View Related

Illustrator Scripting :: Move A Spot Color To A Layer?

Oct 10, 2013

I am trying to grab specific spot colors and move them to separate layers for our cutting software. In this case I am trying to grab "perimeter cut" and move it to a layer called "tc 1" I get the following error when I try to run the script.
 
 #target Illustrator
 var idoc = app.activeDocument;
var ipath = idoc.pathItems;
if (ipath.typename == "SpotColor") {
if (ipath.spot.name == "perimeter cut") {
ipath.move(tc 1, ElementPlacement.PLACEATBEGINNING).
}
}

View 5 Replies View Related

Illustrator Scripting :: Change Color And Line Weight

Jun 6, 2012

I am trying to create a script who could act as an Autocad plot (ie convert each color to black, with a different line weight). 
 
Here is the first script I melted, who create my Black swatch

if ( app.documents.length > 0 ) {
var myDoc = app.activeDocument;
//add Black swatch
var newSwatch = app.activeDocument.swatches.add()
var newColor = new GrayColor();
newColor.gray = 100;
[Code] ......... 
 
And here is the second one, who replace one color by Black (it don't change the text, nor the lineweight yet…
 
if ( app.documents.length > 0 ) {
//test de dialogue
function csDialog() {
var fabGroup = app.activeDocument.swatchGroups.getByName('Fabrics');
var allFabs = fabGroup.getAllSwatches();
var fabNames = Array();

[Code] ........

View 2 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 Check Color Profile For Current Document

Oct 16, 2012

I'd like to create a script that checks the current document's color profile and checks it against a string, for example "sRGB IEC61966-2.1". My studio has a script that performs various functions to make sure that all the layers are visible/unlocked, checks for stray points, etc., and we'd like to add a check to the color profile because we handle a large number of files and this setting is overlooked a lot.
 
It's alright if this value isn't writable through script (we can just pop up an alert letting the user know that they need to change it), but I can't find where to actually read this setting! We're currently working on Macs and with JavaScript, but any nudge in the right direction.

View 11 Replies View Related

Illustrator Scripting :: How To Find Out Textframe Contains Stroke Color (or) Fillcolor

Jul 5, 2011

How to find out the textframe contains "stroke color" (or) "fillcolor" via javascript. Any sample.

View 5 Replies View Related

Illustrator Scripting :: Select All Paths Of Specific Color In One Document

Jan 7, 2009

I'm on Illy CS2, windows xp.

I want to open a doc, run a script that selects all paths of a color, say 255,0,0 or 50,0,20,4 and changes that color to black or another color I specify and also changes the stroke. Is this possible? I can't see how i would do it?

View 6 Replies View Related

Illustrator Scripting :: How To Find Darkest Color In Document Swatches

Oct 15, 2012

Is it possible to find out how bright is an color? I need to find the darkest color in document's swatches. My solution would be to convert (script internally, without actually making any changes in document) swatches to grayscale, compare them and pick the darkest. But how to convert  swatch defined in undefined mode (they might be in lab or cmyk) to grayscale?
 
I found in 'js scriping reference' a method "convertSampleColor", but I have no idea how to use it. Any examples?

View 2 Replies View Related

Illustrator Scripting :: Saving Extendscript Syntax Color Pref?

Apr 4, 2012

is there a way to save extendscript color pref? I am trying to make it so I don't have to update them every time I change machines.
 
seems like they should be saved in defs.xml (under Contents > SharedSupport > Required), but this file doesn't seem to update after I make my changes.

View 6 Replies View Related

Illustrator Scripting :: Color Value Of Spot Colors Cannot Be Adjusted Via JavaScript?

Jul 17, 2012

color value of spot colors cannot be adjusted via javascript?

View 5 Replies View Related

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







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