Adding custom spot colors

Hi all

I am in desperate need of aid. I think the answer to my question is relatively simple, but I don't have a lot of experience in scripting.

I am trying to create a script that adds color to support custom swatch palette. I managed to set up something that works (I've adapted an existing script), but the added colors aren't tasks, some shades of color CMYK.

Also, I need the script no error if the shade already exists. I spent days pulling my hair out trying to get this to work, any help would be greatly appreciated.

Add custom samples

var app.activeDocument = docRef;

function cmykColor (c, m, y, k) {}

var newCMYK = new CMYKColor();

newCMYK.cyan = c;

newCMYK.magenta = m;

newCMYK.yellow = y;

newCMYK.black = k;

Return newCMYK;

}

with (docRef) {}

var a = cmykColor (30, 30, 0, 0);

makeSwatch (docRef, 'Polish', a);

var a = cmykColor (30, 0, 30, 0);

makeSwatch (docRef, 'White Spot', a);

var a = cmykColor (100, 0, 0, 0);

makeSwatch (docRef, 'Profile', a);

var a = cmykColor (0, 0, 0, 75);

makeSwatch (docRef, 'Cut', a);

var a = cmykColor (37, 0, 15, 0);

makeSwatch (a docRef, 'Fold',);

var a = cmykColor (30, 30, 0, 0);

makeSwatch (docRef, 'Perf', a);

var a = cmykColor (20, 0, 0, 0);

makeSwatch (docRef, 'TECH - clear zone', a);

var a = cmykColor (30, 0, 0, 30);

makeSwatch (docRef, 'TECH - free text', a);

var a = cmykColor (0, 0, 0, 50);

makeSwatch (docRef, "TECH - Bleed", a);

var a = cmykColor (7, 20, 0, 10);

makeSwatch (docRef "TECH - text box", a);

}

function makeSwatch (doc, swName, swCol) {}

If (! inCollection (doc.swatches, swName)) {}

var thisSwatch = doc.swatches.add ();

thisSwatch.name = swName;

thisSwatch.color = swCol;

Return thisSwatch;

} else {}

Return doc.swatches.getByName (swName);

}

}

function inCollection (collection, "stringname") {}

are var = false;

for (var i = 0; i < collection.length; i ++) {}

If (collection [i] .name == "stringname") {}

There = true;

}

}

return exists;

}

Hello and welcome.

Try this:

var docRef = app.activeDocument;

var a = cmykColor(0, 0, 0, 50);
makeSwatch( 'TECH - Bleed', a);

a = cmykColor(30, 30, 0, 0);
makeSwatch( 'Perf', a);

a = cmykColor(20, 0, 0, 0);
makeSwatch( 'TECH - Clear Area', a);

function makeSwatch( swName, swCol) {
    if (!inCollection(docRef.swatches, swName)) {
    var aSwatch = docRef.spots.add();
    aSwatch.name = swName;
    aSwatch.color = swCol;
    aSwatch.tint = 100;
    aSwatch.colorType = ColorModel.SPOT;
    var aSwatchSpot = new SpotColor();
    aSwatchSpot.spot = aSwatch;
    return aSwatchSpot;
    }else{
        return docRef.swatches.getByName(swName);
        }
    }

function inCollection(collection, nameString) {
    var exists = false;
    for (var i = 0; i < collection.length; i++) {
        if (collection[i].name == nameString) {
            exists = true;
            }
        }
        return exists;
        }

function cmykColor(c, m, y, k) {
    var newCMYK = new CMYKColor();
    newCMYK.cyan = c;
    newCMYK.magenta = m;
    newCMYK.yellow = y;
    newCMYK.black = k;
    return newCMYK;
    }

Is this good for you?

Tags: Illustrator

Similar Questions

  • Pantone value for custom spot colors

    Hello

    I'm working on a project package that was created by another agency and was picked by my agency for future prints/changes.  I am trying to label all the PMS values used in the work of the printer; However, I came across one called color, "SILVER COUNCIL KNOCKOUT".  On the original final design, it's a bright silver strip where the name of the hair dye. I assumed that this grade has been created by the previous Agency.


    My question is how to find the value of that color PANTONE (if possible), OR whether it would be best to choose another color of PMS equivalent? I work in Illustrator CS6 on an iMac.

    Thank you in advance!

    You can choose your own PMS, but you can convert exsiting Pantone color chart with the command reset: https://www.rockymountaintraining.com/adobe-illustrator-convert-cmyk-swatches-to-pantone/

  • What is the difference between the PANTONE and spot colors

    I need help understanding a concept. In Illustrator, when I double click a nuance I get shade options. In this example, let's say it's one of the default witnesses. When I change the type of color in "Tones" and click OK, I've created a spot color, Yes? Nuance now has the white border with the triangle in the corner indicating. When I send to a printer they tell me that they need a pantone. I was under the impression that a printer would ink custom of my place and that would be printed as a color. Isn't this true? If spot colors must be Pantone, why the color type drop-down open PANTONE books?

    Can someone please explain what a spot color in Illustrator?

    Thank you

    You cannot arbitrarily mix most of the inks in the real world, and so any custom mix formula is mostly meaningless. It is largely the point here.

    (a) it is much easier for main stores order just the premixed colors

    (b) if they mix custom colors, they still need to use specific base inks which are not only CMYK, since there is no way to obtain certain colors in other

    (c) only using correct formulae can ensure the appropriate density / saturation / brightness

    (d) you need to check against a reference color book / strip

    (e) simple chemical and physical factors prevent some mixes of color work

    This might be explained away constantly, but suffice it to say that, in all my years, I have not met a single printing could have mixed colors custom outside Pantone or here in Germany HKS and other systems. Not to say that it is impossible for some colors, but nobody does anymore.

    Mylenium

  • Library spot colors?

    Hello

    When you use the libraries in Illustrator CC 2014 (version 1.1) Panel, whenever I click on 'Add the fill color' when using a spot for example color Pantone 2756C appears in the color library 60 # 262 and, when used in a document is converted in the process (C - 100_ %, M-92.77%, Y - 32_ %, K-17.15%).

    Is it possible to keep it as a spot color when adding to the CC library?

    Any help would be appreciated.

    Libraries.jpg

    Thank you

    Simon

    Currently, no tones are working in the library.

  • Farben spot _ Spot colors

    Hallo zusammen,

    ICH suche Hilfe zur Farbeneinstellung

    und im speziellen muss ich eine Datei als PDF to CMYK und abspeichert mit Spotfarben

    ist kein problem eine PDF to CMYK zu speichern aber wo finde ich die eEinstellung für die farben Spot?

    ICH freue mich auf Hilfe und Danke

    LG Mirela

    Hello world

    I am looking for help on the color settings

    in particular, I need to create a PDF in CMYK with colors 'Spot '.

    It s no problem for me to save a PDF to CMYK, but how/where can I find the setting for 'Spot colors '?

    Pls help and thank you!

    Best regards Mirela

    You must assign a new range of (new spot channel) channel and remember when recording pdf that spot colors are enabled.

  • using transparency multiply with spot colors

    Does anyone know if spot colors can be used with transparency are multiplying in illustrator CC. I want to create a third color of pieces that overlap / two forms of spot color printing?

    Not agree with John, you just have to watch you preview separations to get your answer. Here the 7691 dark blue gradient is on multiply on 7688 blue light, so we get more degraded rich e, rather than the color is dull where the 2 colors meet.

    At the same appearance with CMYK, showing that Nothing's going to CMYK.

    Nothing else in CMYK mode, except for the black

  • Cannot delete unused spot colors.

    I can't delete some nuances of unused spot colors in Illustrator. I can also convert them to CMYK process. When I try to remove the color, the trash is grayed out.

    You have all placed files or raster files, which could use the tones? What happens if you try to select all unused from the Swatch Panel flyout?

  • PANTONE + does not match the previous Pantone spot color chart. I have several customers who are using spot colors in logos etc and now these colors are a mess. Can I get and use the old color for Illustrator books?

    PANTONE + does not match the previous Pantone spot color chart. I have several customers who are using spot colors in logos etc and now these colors are a mess. Can I get and use the old color for Illustrator books?

    Well, the spot color has not changed, but the way they were simulated four-color changed, they now use color management to get to the nearest ink possible task.

    Here is some info:

    https://helpx.Adobe.com/Illustrator/KB/PANTONE-plus.html

  • If an illustrator file has links with spot colors, how can I create PDF files with process colors?

    My file has shades of tones that came with the linked logo, I could not find a way to convert those shades of colors quadri.

    I need to send PDF on a printer with only process colors, I know that the printer can choose to convert spot colors to process when printing with printer within Acrobat Panel, but since we do not print, we need to send files to print ready with process colors only.

    Is there a way or a script to make PDF file generated from Illustrator with process colors only?

    You could try object > flatten transparency and clear colors to preserve overprints and Spot.

    I set the preset high resolution and turn on the preview to see if something dramatic is going to happen.

    After that, you can check the file of color dot in the separations Preview Panel.

  • Acrobat DC does not display of spot colors

    Mac OS 10.10

    I have an InDesign CS5 document with a spot color background.

    When I export to PDF (PDF/X1a) and open the file in Acrobat DC, there is no background color (preview separations shows there is a spot color in the document, but does not display all of the ink of that color)

    If I open the PDF in Acrobat 9 or X, the background color is displayed correctly.

    Is there a setting in Acrobat DC I don't know? Do I have to use a different export setting (I tried several unsuccessful).

    Thank you!

    Hello

    Please go through the next forum thread and see if that fixes the problem.

    Tones do not display in Acrobat DC

    Concerning

    Sukrit diallo

  • How can I get a CMYK or Gray scale halftone and replace it with a spot color with the same value of midtones?

    Is it possible that I can select an object or objects that have a value of mixed CMYK or Grayscale, and then select a Spot color and it will keep the same value of midtones as before?

    For example, I have an object that is C: 0 M: 0 Y: 0 k: 20 and I select Reflex Blue. What is happening is it change my object to 100% Reflex Blue. Is there a way to change to automaitically Reflex Blue 20%?

    Another example, I have 3 objects, one is 20 k: the second is 40 k: and the third is KC: 85. I want to select all the objects in three at the same time, select Yellow PANTONE and get them to change yellow PANTONE 20, 40 yellow PANTONE and PANTONE yellow 85.

    Is there a way to do it or I will always have to manually edit each element?

    Thanks for the help.

    Select the elements to recolor

    Edit > edit colors > redefine > follow my screenshots

    I love clicking this button under the entitlement, one place for everything that you color reduction settings.

    Use tinted scale. Exact will give you 100% of the color. The exact word is confusing here, this means that the color of the destination (100% of everything that the color you choose), not a version tinged scale.

    Unfortunately I do not know how to get the exact values of blacks to convert the exact values of spot color. Scale of hues will you get you get you close enough for what you need. In my example that a black 89% converts a 84% of the place, so no exact but alteast I have a range of shades, and sometimes the results are better than accurate, depends on your art.

    Here are my before and after.

  • How can I change something like the border style of a framing in Muse area by adding custom html/css code?

    I'm changing the border style of a marquee selection around my head. Given that Muse is not one tool online, or support of border styles other than solid (why? I have no idea).

    I know it can be done by adding custom html/css, but so far, I've only managed to put a border dotted around the entire page. Some explain how I can do this please?
    There is no information on the forums and youtube on this subject, and it drives me crazy.

    Hello

    Please try following steps to make it work for you.

    1. place the codes marked in page design mode and preview in the browser.

    2. right click on the selection rectangle in the Navigator and select "Inspect element" (Google Chrome)

    3. Once you do this, you will be able to see that well-known codes are placed in a div with an id as #u75. In this example, it is #u75.

    4. it is the identifier that will target you for CSS.

    5. If the CSS, you will need to add following

    6. you can do a right click on the framing box in design and select "Edit HTML" and put the code before the code of renowned as mentioned below

    7. click on show preview and you will get a dotted border.

    Concerning

    Vivek

  • Opacity value of value of hue change spot color

    Does anyone know a script to change all spot color objects that have an opacity value of the corresponding value of the color of the spot color? Could also be to treat the colors, global or not - but the key is to work.


    If an object uses a spot color that is to say 13% opacity, then it must be on opacity 100% and the value of 13% spot color tint. If an object has been 75% opacity, then it must be set to the hue of 75% to 100% opacity etc. Throughout the tonal range for all objects.


    It would be nice if the blending mode of the spot color has been set to normal if it was something else (obscure, product etc.). I guess it would be great if there was an option to set the object for a collection if the blending mode used was darken or multiply, but this is the icing on the cake. Essence is the opacity value of spot object of the value of spot color mapping and setting the opacity to 100%.


    I would have thought it would be a problem quite common in packaging prepress, however I had no success in the search for such a script.

    Here's a more complete script.

    delivered in a function of maintaining the overall space.

    and should be in RGB, CMYK and Spot colors.

    I would like to know if you find it does unexpected things...

    function RemoveOpacity(){
        // to work on selected items only set to SEL
        // to work on whole document set to ALL
        var work_on = "SEL";
        //---------------------------------------------------------
        var doc = app.activeDocument;
        if(work_on === 'SEL'){
            var items = doc.selection;
        }else if(work_on === 'ALL'){
            var items = doc.pathItems;
        }else{
            alert('the "work_on" variable is not set correctly');
            return;
        }
        for(var i = 0; i		   
  • Spot color vs. .eps art CMYK .eps file

    Asked me to provide 1) a file .eps tones and art 2) CMYK .eps to our company logo. I have an eps file, but beyond that can help me understand what changes I have to do for it to meet the requirements? Thank you in advance.

    Clyde,

    In my opinion, they say you should do a version with the spot color Pantone colors probably chosen company and a version with the closest CMYK equivalent.

    But you can ask them while you ask why they want an EPS rather than the PDF or HAVE. EPS is a bit outdated (for most applications except those where it is formally required for the target application, or something).

  • Where is the cursor color in Illustrator need to do a tint of a spot color?

    Where is the cursor color in Illustrator need to do a tint of a spot color? Can not find it or any reference anywhere?

    Create a global sample (swatch spot) and then you can use a cursor to hue.

Maybe you are looking for