Replace color by color value

Hello

I am trying to remove a specific color and remove with another. How to remove those whose value in the color?

var myColor;
if(myColor ==  app.documents[0].colors.itemByName("PANTONE 287 C") ||  myColor ==  app.documents[0].colors.itemByName("Primary")){
    myColor.remove("C= 98 M= 75 Y= 7 K= 0")
    }

Thank you

Kitty

I think I understand what you're trying to reach. If so, you are going to use delete (replacingWith) as in:

docRef var = app.documents.item (0);

var docRef.colors.itemByName ("PANTONE 287 C") = myColor;

var replaceColor = docRef.colors.itemByName ("C = 98 M = 75 Y = 7 K = 0");

myColor.remove (replaceColor);

Note: This also works with references to swatch

Tags: InDesign

Similar Questions

  • Replace color replaced by Dark, perhaps almost black instead of color I want

    Using Win7, CS6. When I try to replace color, say red with pink, the target turns dark, almost black. I tried every setting I can think, but I can't work. Any thoughts would be appreciated

    To change the colors, it's always depends on the color values you are trying to change amd how much detail you want to keep in your image.

    on a personal level, I prefer not to use the color replacement tool,

    what I do in this simple case is to use the brush with different blending modes

  • Why the Replace Color tool does not replace my color?

    I have the following situation:

    White in the image.

    Choose the color replacement tool

    Choose a red color

    Apply the white color tool

    Nothing happens

    Change color to light mode

    Receive a brownish band where the tool is applied

    Change the color mode and apply the tool to brownish band

    Receive a red strip, where was formerly the brownish one.

    See the three States of the image in the attachment.

    Why was not applied in the first and replaced color replacement tool white with red?

    stripes.jpg

    White is not one any colour change, because there is nothing to change.  Try to place a filled layer of red, above a layer filled with white and setting the blending mode of the layer of the red color to the color.  It just goes to white.  Now fill in the color of white background with grey wire (any value will do.  The darker the gray, the more saturated the Red will become.  Less of the tracks until you get 50% gray.  From there in complete darkness, it becomes darker. When you reach the full black, once more, there is nothing for the color work on, and it appears black.

    It is a useful exercise of understanding how to mix work modes.

  • How to use the tool replace color with the white foreground color?

    I have a black and white image that contains text. I want to change the white area to a specific color.

    Using the Replace Color tool, it doesn't seem to work by selecting the white - he will only select black.

    I need to keep black text not affected.

    Can someone give me a simple method?

    Thank you

    Sam

    the easiest way would be to draw rectangles of color on the new layers above the drawing and set the layer blending layers of color to multiply or darker color.

  • Change all the names of Swatch "Name with color value"?

    Y at - it a Javascript command change the nuances in a document to the "Name with color value" box in the Swatch Options? I know there are scripts to change the names of swatch based on the value of the color, but I'm looking for a script that applies this specific to all checkbox.

    Thanks in advance!

    This should do it:

    (function(){
      var doc=app.activeDocument,
      sw=doc.swatches.everyItem().getElements(),
      c;
      for(var i=3; i

    How can I change the color of the skin around the tattoo while maintaining the depth / shadow and texture in detail.

    Thank you very much

    David

    I tried to use a different approach, the gradient tool...

    1 use the pipette to set the foreground color to the part lighter of his right shoulder (RGB 236,220,220) and set the background color to the darker part of his left shoulder (RGB 200,141,111).

    2. roughly selected tattoo and feathered the selection 3 px.

    3 activate the gradient with the first options plan background and gradient tool linear. Called the gradient from bottom to top, left, right as shown here:

    The Gradient takes a lot of trial and error: where starts and ends at the line, that the foreground/background colors work best.

    Here is the result:

    Then, I used the Clone tool to illuminate the excessive shadow on the right side.

    Also added some shots more in the middle of his back with the brush with large brush (50px) tool and the same background color but a low opacity (50%). You can still change by painting the skin tone clear or dark as you wish.

    Here is the result:

    Since the Gradient is inspired by solid colors it destroys existing contour, texture, spots of birth, etc. You can restore certain contour by painting as I did above. If the skin appears too smooth you can try to apply the noise filter on the same area. Here I used a $ 1.

  • Place images in Illustrator changes their color values - why?

    I've been put photoshop tiff files in Illustrator, and this seems to change the color values, when I sample with the eyedropper tool. The images that I did use a custom mix of intense Black of CMYK, with the K value of 100. In Illustrator, they seem to go back to the default "black Photoshop' value, about C75 M68 Y67 K90. It is not my intention to C70 M60 Y58 K100. The Illustrator document's CMYK mode, and I don't know why this is happening. No graphic elements (vectors) in my illustrator file retain the color values, I intended, however.

    Is this some kind of framework that I can change in Illustrator? This gap will be displayed when this file goes to print? Help, please! Thank you.

    When the image is not embedded, Illustrator samples the values of representation. Those that are managed by color management.

  • replace color (why is it impossible?)

    Very new to photoshop. I'm talking about CSS.

    I: photoshop cs6 extended. The image is in RGB mode.

    I want to replace two color United with two new solid colors. More precisely:

    • (#000) Black w / light brown (#592F0A)
    • White (#FFF) w / a light blue (# 54648). Why sacred devil is so darn impossible?

    I read (and watched) several tutorials on the "image > adjustments > replace color" dialog box.

    I also read (and watched) several tutorials on the 'the color replacement tool' in the Toolbox.

    Everyone, without success. This work is so simple, I'm next to me with how photoshop is to be so dense.

    Hi, WYD.

    One way, using the Replace Color tool:

    1 game of the color chip in the color of foreground in the Toolbox

    (for example, to set the 592F0A for the black color, and then set the color

    54648 c before painting with light on white)

    2. change the mode of the replace color to brightness tool

    3. paint over the area you want to change

    4. set the mode to color to color replacement tool

    5. paint on this place that you painted in the brightness mode.

    (click on the scrennshots below for more great views)

    painted with the brightness on the black and white:

    painted with the color mode:

  • Help, replace color

    Hi all

    I'm new on Photshop and difficulties to do that I suppose to be a pretty simple job.  I have pictures black and white that I need to convert in two colors.  I've done enough easily before in other programs.  (The drawings in the headers of the pages of this Web site, www.coggeshallfarm.org, I converted using the feed to color breastfeeding in Paintshop Pro.)  I use the replacement color to change black and gray, but they are sitting on a white background that I can't replace.  I don't know there is something obvious that I'm missing.  Any help you can give would be great.  Thank you

    Justin

    Or just the back - and foregroundcolors before you create the gradient layer to the map.

  • RGB color values change when I create a PDF file in Indesign

    Hi I have a night Mare, please please please help me.

    I design a lot of websites in Indesign, export to PDF and then slice and dice the pdf in Pshop, while coding I'm going.

    I just upgraded to CS5 and seem to have a nightmare when I export my drawings in PDF format. When I open the PDF file in Acrobat or Pshop RGB color values are always different from what they were in Indesign (only subtly). I tried all the options and settings I can think when I make a PDF, but still the color values are different in the final PDF file.

    Why this keep happening, this settings, I have set before you make the PDF to ensure my RGB color values remain the same.

    I use Acrobat 7 Professional.

    Do not include the profiles. You have a problem of current color management (workspaces probably not synchronized). If there is no profile, the opeing application will ask what it is or take the current work profile, which is what you want, if the numbers must be preserved.

  • How to get the RGB color values on the color picker component?

    How to get the RGB color values on the color picker component?

    trace (cp.selectedColor);

    Returns something like:

    16750950

    trace (key2cp.hexValue);

    Returns:

    ff9966

    I'm looking for RGB, for example, 0.5 0.5 0.5, corresponding to a gray color.

    Is there a chance that the RGB settings are hidden somewhere or is there a conversion function at least?

    Thank you.

    If key2cp.hexValue returns a string like 'abcdef', use:

    var s:String = key2cp.hexValue;

    var n: Number = Number("0x"+s);

    var r: Number = n > 16 & 0xff;
    var g:Number = n > 8 & 0xff;
    var b:Number = n & 0xff;

  • "Replace color" missing in CS3 tool

    I use CS3 (Windows) and miss me the "Replace color" tool

    All other tools seem to be available (I think).  See a screenshot of my toolbar below.

    Could I have removed inadvertently deleted / my color replacement tool?

    Is there a way to restore my color replacement tool?

    CRS

    My-CS3-Tool-Bar.png

    See the tool stamp at the bottom right of the bitmap tools? Click on the small triangle in the lower right to bring up the context menu. This is, as well as the red-eye removal tool. Any time there is a small triangle, which means that there are several tools in one box.

  • Changing in indesign CMYK color value

    Hello

    I created a logo in Illustrator cs4 with the CMYK value 85% 45% 0% 10% when I place the AI logo file in indesign and use the pipette to check color, it returns 87.06 50.98% 5.49% 0%. Both applications are set to the same color through bridge settings. The strange thing is, codes two colors seems to be identical to the screen and on paper. Miss me probably a fundamental idea, but Im fairly new to graphics design, so any idea why color value changes, would be appreciated.

    To simplify:

    You must use the Eyedropper to sample colors, text, and objects created in InDesign, all placed graphics are just miniature rgb from the original to serve as layout. The original image and the colors are used on printing and exporting.

    You can export colors in the swatches Panel menu in Illustrator and save the file as an .ase and load these swatches from indesign using the fly to swatch Panel there.

    Transfer not degraded.

    The other way is to copy and paste illustrator objects in indesign and delete the copy and paste job. The color chart will transfer with gradients.

  • Another question border.fill.color.value

    I'm trying to script an if statement to set the background value according to the instanceIndex of a subform.  I tried it in the click event of the addButton and the subform indexChange event.  I saw an example of exactly what I'm trying to do, but for the life of me I can't find it now.  I searched this forum both the users of the forum and I know that it was in one of them.  In any case, here's what the script looks like:

    -form1. Main_Subform.AdditionalAssaysSubform::indexChange :-(JavaScript, both).

    If

    (form1. Main_Subform.AdditionalAssaysSubform.instanceIndex == '0') { }

    Form1. Main_Subform.AdditionalAssaysSubform.AddedAssaysDropdown.border.fill.color.value

    = '240,240,240 ';

    Form1. Main_Subform.AdditionalAssaysSubform.AddedAssaysDataTable.border.fill.color.value

    = '240,240,240 ';

    Form1. Main_Subform.AdditionalAssaysSubform.AddedAssayAvgNeg.border.fill.color.value

    = '240,240,240 ';

    Form1. Main_Subform.AdditionalAssaysSubform.AddedAssayDisplacement.border.fill.color.value

    = '240,240,240 ';

    }

    on the other

    If(form1. Main_Subform.AdditionalAssaysSubform.instanceIndex == '2') { }

    Form1. Main_Subform.AdditionalAssaysSubform.AddedAssaysDropdown.border.fill.color.value

    = '240,240,240 ';

    Form1. Main_Subform.AdditionalAssaysSubform.AddedAssaysDataTable.border.fill.color.value

    = '240,240,240 ';

    Form1. Main_Subform.AdditionalAssaysSubform.AddedAssayAvgNeg.border.fill.color.value

    = '240,240,240 ';

    Form1. Main_Subform.AdditionalAssaysSubform.AddedAssayDisplacement.border.fill.color.value

    = '240,240,240 ';

    }

    on the other

    if(form1. Main_Subform.AdditionalAssaysSubform.instanceIndex == '4') { }

    Form1. Main_Subform.AdditionalAssaysSubform.AddedAssaysDropdown.border.fill.color.value

    = '240,240,240 ';

    Form1. Main_Subform.AdditionalAssaysSubform.AddedAssaysDataTable.border.fill.color.value

    = '240,240,240 ';

    Form1. Main_Subform.AdditionalAssaysSubform.AddedAssayAvgNeg.border.fill.color.value

    = '240,240,240 ';

    Form1. Main_Subform.AdditionalAssaysSubform.AddedAssayDisplacement.border.fill.color.value

    = '240,240,240 ';

    }

    on the other

    if(form1. Main_Subform.AdditionalAssaysSubform.instanceIndex == '6') { }

    Form1. Main_Subform.AdditionalAssaysSubform.AddedAssaysDropdown.border.fill.color.value

    = '240,240,240 ';

    Form1. Main_Subform.AdditionalAssaysSubform.AddedAssaysDataTable.border.fill.color.value

    = '240,240,240 ';

    Form1. Main_Subform.AdditionalAssaysSubform.AddedAssayAvgNeg.border.fill.color.value

    = '240,240,240 ';

    Form1. Main_Subform.AdditionalAssaysSubform.AddedAssayDisplacement.border.fill.color.value

    = '240,240,240 ';

    }

    on the other

    if(form1. Main_Subform.AdditionalAssaysSubform.instanceIndex == '8') { }

    Form1. Main_Subform.AdditionalAssaysSubform.AddedAssaysDropdown.border.fill.color.value

    = '240,240,240 ';

    Form1. Main_Subform.AdditionalAssaysSubform.AddedAssaysDataTable.border.fill.color.value

    = '240,240,240 ';

    Form1. Main_Subform.AdditionalAssaysSubform.AddedAssayAvgNeg.border.fill.color.value

    = '240,240,240 ';

    Form1. Main_Subform.AdditionalAssaysSubform.AddedAssayDisplacement.border.fill.color.value

    = '240,240,240 ';

    }

    on the other

    if(form1. Main_Subform.AdditionalAssaysSubform.instanceIndex == '1') { }

    Form1. Main_Subform.AdditionalAssaysSubform.AddedAssaysDropdown.border.fill.color.value

    = "255,255,255";

    Form1. Main_Subform.AdditionalAssaysSubform.AddedAssaysDataTable.border.fill.color.value

    = "255,255,255";

    Form1. Main_Subform.AdditionalAssaysSubform.AddedAssayAvgNeg.border.fill.color.value

    = "255,255,255";

    Form1. Main_Subform.AdditionalAssaysSubform.AddedAssayDisplacement.border.fill.color.value

    = "255,255,255";

    }

    on the other

    If(form1. Main_Subform.AdditionalAssaysSubform.instanceIndex == '3') { }

    Form1. Main_Subform.AdditionalAssaysSubform.AddedAssaysDropdown.border.fill.color.value

    = "255,255,255";

    Form1. Main_Subform.AdditionalAssaysSubform.AddedAssaysDataTable.border.fill.color.value

    = "255,255,255";

    Form1. Main_Subform.AdditionalAssaysSubform.AddedAssayAvgNeg.border.fill.color.value

    = "255,255,255";

    Form1. Main_Subform.AdditionalAssaysSubform.AddedAssayDisplacement.border.fill.color.value

    = "255,255,255";

    }

    on the other

    if(form1. Main_Subform.AdditionalAssaysSubform.instanceIndex == '5') { }

    Form1. Main_Subform.AdditionalAssaysSubform.AddedAssaysDropdown.border.fill.color.value

    = "255,255,255";

    Form1. Main_Subform.AdditionalAssaysSubform.AddedAssaysDataTable.border.fill.color.value

    = "255,255,255";

    Form1. Main_Subform.AdditionalAssaysSubform.AddedAssayAvgNeg.border.fill.color.value

    = "255,255,255";

    Form1. Main_Subform.AdditionalAssaysSubform.AddedAssayDisplacement.border.fill.color.value

    = "255,255,255";

    }

    on the other

    if(form1. Main_Subform.AdditionalAssaysSubform.instanceIndex == '7') { }

    Form1. Main_Subform.AdditionalAssaysSubform.AddedAssaysDropdown.border.fill.color.value

    = "255,255,255";

    Form1. Main_Subform.AdditionalAssaysSubform.AddedAssaysDataTable.border.fill.color.value

    = "255,255,255";

    Form1. Main_Subform.AdditionalAssaysSubform.AddedAssayAvgNeg.border.fill.color.value

    = "255,255,255";

    Form1. Main_Subform.AdditionalAssaysSubform.AddedAssayDisplacement.border.fill.color.value

    = "255,255,255";

    }

    on the other

    if(form1. Main_Subform.AdditionalAssaysSubform.instanceIndex == '9') { }

    Form1. Main_Subform.AdditionalAssaysSubform.AddedAssaysDropdown.border.fill.color.value

    = "255,255,255";

    Form1. Main_Subform.AdditionalAssaysSubform.AddedAssaysDataTable.border.fill.color.value

    = "255,255,255";

    Form1. Main_Subform.AdditionalAssaysSubform.AddedAssayAvgNeg.border.fill.color.value

    = "255,255,255";

    Form1. Main_Subform.AdditionalAssaysSubform.AddedAssayDisplacement.border.fill.color.value

    = "255,255,255";

    }

    I also tried to use the or (|) and combine the fi.  My question is... I use the correct event; I place the conditional statement in the appropriate place; or I again in left field?  Any suggestions would be much appreciated.  Thanks in advance. -rpeterson

    Hi Renee,.

    Here is an example highlighting the background color of the field nested inside a repeating subform based on the index of the repeating subform. The background color will not change enter/exit the fields but will create a color pattern similar to shadow line of the tables.

    This JavaScript script lives in the repeating subform AdditionalAssaysSubform indexChange event.

    nIndex var = this.instanceIndex;
    nColor var;

    If (nIndex % 2 == 0)
    nColor = "240,240,240";
    on the other
    nColor = "255,255,255";

    Use the following if you want to change the background color of the object
    AddedAssaysDropdown.border.fill.color.value = nColor;
    AddedAssaysDataTable.border.fill.color.value = nColor;
    AddedAssayAvgNeg.border.fill.color.value = nColor;
    AddedAssayDisplacement.border.fill.color.value = nColor;

    Or background color of the following if you want to change the widget
    AddedAssaysDropdown.ui.oneOfChild.border.fill.color.value = nColor;
    AddedAssaysDataTable.ui.oneOfChild.border.fill.color.value = nColor;
    AddedAssayAvgNeg.ui.oneOfChild.border.fill.color.value = nColor;
    AddedAssayDisplacement.ui.oneOfChild.border.fill.color.value = nColor;

    See you soon

    Helen

Maybe you are looking for