Coloring a font with a RGB, etc. without adding color in the swatch of the document.

Is it possible to color a font with a RGB, Lab, or CMYK color without adding color in the swatch of the document.

The only way I know is to add a color to the color chart or use an existing one.

as

App.Selection [0]. Characters [0]. FillColor = document. Colors.Add ({colorValue: 255, 53 (160) and space: ColorSpace.RGB}) ;}

As a side effect to clutter up shades using many colors.

any ideas?

Hello Uwe!

After 03:00 by me 02:00 by you

I tried the link and it download but I have cs5 cs6 and cc but not cs5.5 and all the scripts worked on them can due to the conversion of files.

It seems therefore that the following summary is all is correct

New documents contain some

Color chart (black, registration, paper and none) the index order is the order in which shades appear in the swatches Panel

And the colors in the order of the alphabetical index

named colors without name last and then 'A', 'Z' first color.

Color documents News-[1] will be a color without a name that can be duplicated to produce other colors without name, noting that duplication should be processes and not the tones.

So far so good, (not for long)

Unnamed colors are not read only so if we make a positive effort to remove, we can do that.

while (app.activeDocument.colors[-1].name == "") app.activeDocument.colors[-1].remove()

Now, we will not have any what swatches without a name to duplicate and will have to use the method of file text marked with John at number 3 above.

If there is no shade no name and we try to replicate the colors [-1] and it's a color as 'Yellow', then it seems s indesign crash.

In any case the method below should always work (for regular non-dyed colours etc.).

// optimized for easy of use but not efficiency !!!
var doc = app.documents.add();
var p = doc.pages[0];

p.textFrames.add({contents: "RGB", geometricBounds: ["0mm", "0mm", "30mm", "30mm"], fillColor: addUnnamedColor([0, 0,255])}); // will be a RGB
p.textFrames.add({contents: "RGB", geometricBounds: ["0mm", "30mm", "30mm", "60mm"], fillColor: addUnnamedColor([0, 255,0], 1666336578)}); // will be a RGB because of value
p.textFrames.add({contents: "RGB", geometricBounds: ["0mm", "60mm", "30mm", "90mm"], fillColor: addUnnamedColor([65, 50, 102], ColorSpace.RGB)}); // will be a RGB
p.textFrames.add({contents: "RGB", geometricBounds: ["0mm", "90mm", "30mm", "120mm"], fillColor: addUnnamedColor([84, 90,40],"r")}); // will be a RGB
p.textFrames.add({contents: "RGB", geometricBounds: ["0mm", "120mm", "30mm", "150mm"], fillColor: addUnnamedColor([232, 0, 128],1)}); // will be a RGB

p.textFrames.add({contents: "Lab", geometricBounds: ["30mm", "0mm", "60mm", "30mm"], fillColor: addUnnamedColor([29.5, 67.5, -112])}); // will be a Lab because of -
p.textFrames.add({contents: "Lab", geometricBounds: ["30mm", "30mm", "60mm", "60mm"], fillColor: addUnnamedColor([100, -128, 127], 1665941826)}); // will be a Lab because of value
p.textFrames.add({contents: "Lab", geometricBounds: ["30mm", "60mm", "60mm", "90mm"], fillColor: addUnnamedColor([24.5, 16, -29], ColorSpace.LAB)}); // will be a Lab
p.textFrames.add({contents: "Lab", geometricBounds: ["30mm", "90mm", "60mm", "120mm"], fillColor: addUnnamedColor([36.8, -9, 27],"l")}); // will be a Lab
p.textFrames.add({contents: "Lab", geometricBounds: ["30mm", "120mm", "60mm", "150mm"], fillColor: addUnnamedColor([51, 78, 0], -1)}); // will be a Lab because of the 1

p.textFrames.add({contents: "CMYK", geometricBounds: ["60mm", "0mm", "90mm", "30mm"], fillColor: addUnnamedColor([82, 72, 0, 0])}); // will be a CMYK because there are 4 color values
p.textFrames.add({contents: "CMYK", geometricBounds: ["60mm", "30mm", "90mm", "60mm"], fillColor: addUnnamedColor([60, 0, 100, 0], 1129142603)}); // will be a CMYK because of value
p.textFrames.add({contents: "CMYK", geometricBounds: ["60mm", "60mm", "90mm", "90mm"], fillColor: addUnnamedColor([84, 90,40, 0], ColorSpace.CMYK)}); // will be a CMYK
p.textFrames.add({contents: "CMYK", geometricBounds: ["60mm", "90mm", "90mm", "120mm"], fillColor: addUnnamedColor([67, 53, 97.6, 21.7], "c")}); // will be a CMYK
p.textFrames.add({contents: "CMYK", geometricBounds: ["60mm", "120mm", "90mm", "150mm"], fillColor: addUnnamedColor([0, 100, 0, 0], 0)}); // will be a CMYK

function addUnnamedColor (cValue, space, docToAddColor) {
    docToAddColor = app.documents.length && (docToAddColor || (app.properties.activeDocument && app.activeDocument) || app.documents[0]);
    if (!docToAddColor) return;
    var lastColor = docToAddColor.colors[-1];
    if (!cValue) cValue = [0,0,0,0];
    if (space == 1129142603 || cValue && cValue.length == 4) space = ColorSpace.CMYK;
    else if ((space && space < 0) ||  space && space == 1665941826 || (space && /L|-/i.test(space.toString())) || (cValue && /-/.test(cValue ))) space = ColorSpace.LAB;
    else if ((space && space > 0) || space && space == 1666336578 || (space && /R/i.test(space.toString())) || (cValue && cValue.length == 3)) space = ColorSpace.RGB;
    else space = ColorSpace.CMYK;
    app.doScript (
        """
        var newUnnamedColor = (lastColor.name == "") ? lastColor.duplicate() : taggedColor();
        newUnnamedColor.properties = {space: space, colorValue: cValue};
        """,
        ScriptLanguage.javascript,
        undefined,
        UndoModes.FAST_ENTIRE_SCRIPT
    );

     function taggedColor() { // need to use this if no unnamed exists
             var tagString = "\r " : "WIN>\r ") + ""; // would make more sense to apply the correct value in the tagged text file but I can't be bothered !
             var tempFile = new File (Folder (Folder.temp) + "/ " + (new Date).getTime() + ".txt");
             tempFile.open('w');
             tempFile.write(tagString);
             tempFile.close();
             var tempFrame = docToAddColor.pages[-1].textFrames.add();
             $.sleep(250);
             tempFrame.place(tempFile);
             tempFrame.remove();
             tempFile.remove();

         return docToAddColor.colors[-1];

     }

    return newUnnamedColor;
}

Apply the function to remove and replace swatch on the other thread both healthier of mind

Concerning

Trevor

Tags: InDesign

Similar Questions

  • Why the font size is so great when adding text to the photo in high resolution?

    Why the font size is so great when adding text to the photo in high resolution?

    Font size is usually determined by the size in points. 72 points equal to 1 inch. the size is independent of the size of your actual file. You might have a file that is located at 72 dpi, which is set to a 5 X 7 "and the police would be the size even if it is a 1200 dpi image 5 X 7.

  • Find the spot colors in the document

    I prepare a document for printing, and when I go to the package for output I get a message that there are a handful of spot colors in addition to the CMYK. Is it possible I can get InDesign to show me where in my document these tones are? (There are many graphics placed in many pages) I can't seem to find a 'show' or 'page number' for these colors. In addition, if the CMYK symbol appears to the right of the point of color in the Panel swatched, am I good as went to press?

    Maybe the satest to see where the spot colors are in use is to open the Activ separations and separations Preview Panel, and then click the eyeball next to CMYK. Everything left on the page is your direct. If you do not see a spot color in the Panel, there are none in use.

    You asked if it was safe to go to print with stains, and the answer is that it depends. Are paying you extra for the spot colors? If this isn't the case, Swatches Panel flyout menu choose Manager of inks, then check the box to convert all Spots to process and for the best conversion to any known color space, check the box to use the Lab values as well. Don't know what you mean by seeing the CMYK symbol to the right of the swatch - which means that it is not RGB, but there are two small icons there and the one on the left will tell you if the color is spot on, but neither one will tell you if it is transposed to the process in the ink Manager.

  • I can change the color of the document title in the pages on my iPhone 5s

    In the pages on my iPhone document titles are in orange on white background - very difficult to read for someone with glasses whose eyesight is not as good as a young man!  Can anyone help?

    I've never seen a way to change this. The text of the document itself can be adjusted for different colors.

  • Question of novice on the color in the document

    Need help please.  You figure at all now that I am a real novice here!

    I enclose you a screen shot of what I speak.

    I have 3 pieces that are the same color.  View where #1 is under #2 and it is all supposed to look like 1 room.  I tried moving it and moving back and the room always see in the background as a darker color.  What should I do?Screen Shot 2014-02-03 at 10.48.34 AM.png

    You work with transparency, I supoose you reduced opacity.

    Do you really want transparency or you want only a lighter color. You use a tone or a lighter color in the color Panel and not reduce opacity in the effect controls panel.

    When you're a novice, try to avoid the transparency at the beginning. Transparency is not a bad thing, but needs some information, that you have to learn before. I think that in the help file, you will find a lot of information about transparency.

  • Definition of area of purge without any effects in the document size dialog box

    Hi all


    Can I create a new document with the bleeding, it works very well. Should I try to change the lost funds, it seems not to be saved by the document size dialog box.


    Here is my code to create the document:

    NewDocCmd InterfacePtr < ICommand > (() Utils < IDocumentCommands >-> CreateNewCommand(K2::kFullUI));))

    NewDocCmdData InterfacePtr < INewDocCmdData > (newDocCmd, UseDefaultIID());

    newDocCmdData-> SetCreateBasicDocument (kFalse);

    newDocCmdData-> SetNewDocumentPageSize (PMPageSize (width, height));

    newDocCmdData-> SetWideOrientation ((width>height)? kTrue: kFalse);

    newDocCmdData-> SetMargins (left, top, right, bottom);

    newDocCmdData-> SetNumPages (numPages);

    newDocCmdData-> SetPagesPerSpread (1);

    newDocCmdData-> SetColumns_4 (colNum, gridDist, IColumns::kVerticalColumnOrientation);

    newDocCmdData-> SetUseUniformBleed (false);

    PMRect bleedBox.

    bleedBox.Left (mm2pt(bleedLeft/1000.f));

    bleedBox.Top (mm2pt(bleedTop/1000.f));

    bleedBox.Right (mm2pt(bleedRight/1000.f));

    bleedBox.Bottom (mm2pt(bleedBottom/1000.f));

    newDocCmdData-> SetBleedBox (bleedBox);

    Create the new document.

    CmdUtils::ProcessCommand (newDocCmd);

    The document size dialog box shows my correct bleeding.

    And this is the code I use to change him bleed (suppose bleedBox has different values now):

    InterfacePtr < ICommand > pageCmd(CmdUtils::CreateCommand(kSetPageSizeCmdBoss));)

    InterfacePtr < IDocSetupCmdData > pageData (pageCmd, IID_IDOCSETUPCMDDATA);

    pageData-> SetDocSetupCmdData (docRef, PMPageSize (width, height), 1, 1, width > height, kLeftToRightBinding, kTrue);

    pageData-> SetUseUniformBleed (false);

    pageData-> SetBleedBox (bleedBox);

    The SetPageSizeCmd process

    CmdUtils::ProcessCommand (pageCmd);

    No error, but also no change in the dialog box the size of the document. Purge values are unchanged.

    What else I have to call the dialog box to show my new bleeding?


    If I give the word

    BB2 = pageData-> GetBleedBox();

    then bb2, later the (modified) values.


    Thanks for all your advice!


    kb_alfa

    Hi kb_alfa

    Use kSetPageSetupPrefsCmdBoss instead of kSetPageSizeCmdBoss

    -Manan

  • The list of all the colors in the document CS5?

    Hello

    Does anyone know if there is a way to get a list of all colors and tints used in a document? Color chart was not used by the person who created this document, apparently.

    Thank you very much

    Ariel

    Have you tried selecting Add colors used in color chart context menu?

    JET

  • Cannot replace the colors in the document (background and text)

    I have many documents to read, but the glaring white background of PDF files really hurts my eyes and I end up getting migraines.

    I changed the colors 'document' [Edit > Preferences > accessibility > Document Color Options > replace Document colors > custom color: Page Background gray =;] Text = Black]

    Adobe Reader.JPG

    I have the "Replace Document colors" checked, and I chose Custom colors (gray, black background text).  However, this does not change the background color and text of most PDF files.  Even if everything is checked, when I press OK, the document remains black on white text.

    Help, please...  Thank you!

    However, this does not change the background color and text of most PDF files

    This does not change the color of scanned documents.

  • How do I return my iphone to apple with the packge that they sent to me with TNT for repair without having to pay the fee of €50?

    my Iphone is now in ruins there something with the hardware, I think and I conact with Apple support and they sent me a package take I send them my iphone back to repair but I have to pay €50 for shipping with the TNT company and they said that if I have a 3 coupons for apple with the package they ship it free but I did ' t get coupons with the package
    can someone help with this problem?

    Hello, Salma,

    We are users like you.  You must contact the Apple support (again) and ask (again) for coupons and explain the problem you have regarding shipping.

    -Tschüss

  • I work in InDesign and am unable to access the screen that shows the choice of fonts, the font size, alignment, kerning, etc.. I see the toolkit but not these options. Pleas tell me how to access these options again

    That's exactly the screen I'm trying to access. I used to see, but it is hidden now. Please tell me how to bring it up again. Thank you!

    You may need to move from the basics to the Advanced. Go: Window > workspace > advanced.

    I've worked edge ahead (with these options showing you listed), but when I've upgraded to the latest version of CC, he did "essentials" my fault, which eliminates these tool options. VERY ANNOYING... I have to keep switching to advanced. Other things do not work for me now, too (like the selection tool... essentially to make it unusable). I don't know what's going on, but something is very buggy now, which is very disappointing for me. I lost all evening trying to make it work, and now I'll get my project done.

  • Cannot use the maximum color in the document CMYK values - what's the problem?

    I can't put all the colors in my document at maximum saturation (i.e., the value of 100) and brightness. What is a CMYK thing, I never noticed before?

    If I physically just move the sliders up to 100, then the color of my selected object does not change. When I leave the color window and enter it again, the values have themselves changed to something in the range of 65-85.

    Tried a new document and tried Pshop preferences without change in compensation. Everything works very well in a RGB doc.

    I'd like to help! Thank you!

    CMYK may show only the yellow, magenta and saturated cyans.

    It cannot reproduce saturated red, green or blue.

    TSL values compared to the RGB.

    LAB values would be of same clip in CMYK mode, because they can be well outside the range of CMYK.

    Yes, I suspect you missed just as before.

  • 2550n deaf then progressively less colored on the document of several pages and now none

    Problem started with the strange new relatively strong noise jerky rhythm while printing. All startup and systematic seems ok. Printed with success of State of supply and free page / test configuration at some point after the printer market but with a document of several pages, page 1A was perfect, lighter 2 page, page 4 and page 3 yellow and go progressively yellow fake only. Now it does not apply any at all what toner and paper appears as white as he went.

    Dark cyan is on (544 pages remianing EST) but no other warnings or lights newspaper correspondents.

    No idea how I confirm definitively what who is at fault? I have a service manual and am happy to tackle the problem, but with no printer engineering background would not know what was defective or not!

    Hi David

    No, the printer came not on loan.

    Engines operated but nothing changed.

    But wait...

    I used furry side (not spicy) velcro glued with glue to the impact. I chose this side because when I put a level on a sample of both, the soft side of fur was very slightly more thin.

    Put all back together and it works! Drum rotates smoothly, the warm-up is completed, ready light turns on and the pages of the file config/status and the real impression.

    The only differences are:

    1 / use velcro as opposed to slot the Chair or the foam cushion. The differences in thicknesses were low)<1mm) but="" may="" have="" been="" critical.="" my="" original="" worn="" pad="" seemed="" ok="" but="" was="" very="" thin=""><1mm and="" the="" first="" felt="" i="" tried="" was="" thicker.="" the="" foam="" was="" between="" the="" two="" but="" as,="" i="" said,="" even="" lifting="" the="" 'l'="" arm="" with="" a="" screwdriver="" failed="" to="" permit="" a="" free="" complete="" rotation="" without="" snagging="" when="" each="" toner="" passed="" the="">

    2 / when the solenoid is re-fixed, even if it has a hole and not a slot, which implies a position fixed, there is a small movement and so I shook at the limit of the upward movement in the hole so that the arm had a tiny less distance to be pulled up by the solenoid to release the carousel.

    3 / I cleaned up all the excess toner everywhere.

    I am indebted to you for your guidance, patience and the solution.

    I lost 100 + pages of each toner but the problem is solved.

  • HP Color Laserjet CP2025 does not print the colors in the document

    Original title: print film

    I can't print in collor. I have a Collor HP Laserjet CP2025 and somehow it does not print the prodct in my document.

    Hi DirkjeAbma,

    1. When did you start to question?

    2. you remember to make changes to the computer before this problem?

    3 color printing fails all printing applications?

    You can see the following HP support article and check if it helps to solve the problem:

    HP Color LaserJet CP2020 printer - image quality problems

    You can also read the following article and check:

    How can I check my ink or toner levels?

    Hope this information is useful.

  • Choose the RGB color in Illustrator (swatches and sliders are in CMYK mode)

    I do a simple model of cutting laser. Cutting laser acts as a printer and you choose the power, speed, etc. for each color in the document. I want to just cut, so I only lines red RGB 0.001 pt thickness. Or at least that was the plan. One of the forms in my model has come out a different red (the shades were CMYK despite the document color in RGB mode). I would like to now select all the paths in the document and make them all red RGB. However, when I open the color Panel from the dock the sliders are CMYK, once it comes despite the document color in RGB mode:

    WhereIsRGB.jpg

    How can I change all paths be red RGB?

    How can I stop Illustrator offering me color chart and options of CMYK and RGB offering instead?

    Post edited by: Dumble_dad adding the missing words

    Dumble-dad,

    I changed the RGB Panel, but now it is only to offer me the K cursor!

    If you have checked RGB and grayscale obtained, there must be something wrong, most likely in your preferences.

    Here is a list of things to try when strikes of strangeness (you may have tried / some of them already) and see if that helps you (the following is a general list of things, you can try when the question is not in a file specific; 3) and 4) specifically may be corrupted preferences):

    (1) close Illy and open again.

    (2) restart the computer (you can do that up to 3 times);

    (3) close Illy and press Ctrl + Alt + Shift / Cmd + Option + shift during startup (easy, but irreversible);

    4) to move the folder with closed Illy (more tedious but also more thorough and reversible);

    ((5) browse and try the relevant among the other options (point 7) is a list of the usual suspects among other applications which can disturb and confuse Illy);

    Even worse, you can:

    (6) uninstall, run the cleanup tool if you have CS3, CS4, CS5, CS6 and reinstall.

    http://www.Adobe.com/support/contact/cscleanertool.html

  • Changing colors in the work plans

    I hope I am not confusing someone who might be able to help me!

    I have 3 work plans implemented in a single document.

    For each work plan, I need to have an illustration only using 2 spot colours, and then I need to turn between 3 colors, yellow + green second must be green + blue and the third blue + yellow is in a work plan.

    How can I exchange the colors without changing all the colors in the document, whenever I go to a work plan and select the color of the yellow spot and alt and drag the green on (because I'm on PC), the Green replaces all colors in three work plans , I only want to trade it off of work plans.

    I really hope that I feel...

    You can easily swap the colors with Edit > edit colors > redefine.

    Select the colors you want to share and drag the right color rectangles in the dialogue redefine.

Maybe you are looking for

  • My data has been lost during the whole upward, there is nothing to sync how to start more fees.

    I started the process as a new user & just as data has started to copy my turn lost power for a few seconds. The data is immobilized as if made, but nothing has been recorded. The system went on as if everything was OK. When I tried to Sync to my new

  • Download player extender

    When I boot I get a pop up to please reinstall reader of the Extender.

  • Sites on the list are now blocked

    Summary of the issueOther issues of Windows Live family safety What version of Windows Live Family Safety do you use? Version 2011 (15.4.3538.513) Choose your operating system version: Windows 7 Additional detailsMy son has a filter "allowed list onl

  • EMule is blocked, how to fix?

    Network wireless adapter NIC Ethernet network deviceI HAVE A PROBLEM WTH EMULE, WHICH IS BLOCKED HOW TO FIX THE PROBLEM?ELIEL SCHÄFLER

  • Windows Update will not update

    I have the starter to windows 7 and it will not be updated. Sympatico is my internet service provider. any help out there.  e-mail from Microsoft Help is extremely slow to use