create a color in a color group

Hello

I have create a color in the swatch Panel, that ok, I create a color Group (colorGroups js), ok for. But I want to create a color to color group and can't find a code for that js. Maybe I need to create a color and remove within a color group after?

Can anyone help?

Thant much.

Hi, try this example.

//@target "indesign-10"

var doc = app.documents.add();
var color_group = doc.colorGroups.add({name:"CG"});

var ref_swatch = doc.colors.add({
  model: ColorModel.PROCESS,
  space: ColorSpace.CMYK,
  colorValue: [100,50,0,0],
  name: "ref_swatch"}
);

var color_group_swatch = color_group.colorGroupSwatches.add(ref_swatch);

$.writeln([
  color_group_swatch.swatchItemRef.colorValue,
  color_group_swatch.swatchItemRef.name
]);

// => [[100,50,0,0],"ref_swatch"]

Thank you

mg.

Tags: InDesign

Similar Questions

  • The "Comprehensive" designation goes with change color group CS3

    Howdy,

    Working my way through Real World Illustrator book of Morty Golding - just after touting the virtues of the use of global process color charts, the following section outlines on create and edit color groups.

    I can create a color group of global process colors, but when I select the folder for the group in the swatches Panel and click on the icon to change group of colors at the bottom of the Panel Swatchs and make my changes, the overall designation disappears when I save the changes in the live color dialog box.

    I am doing it wrong, or is this a "feature"?

    It's a bug, but that adobe does not include updates, Adobe sells you the next version with new bugs.

  • How is - what cut you a rectangle in 2 colors with a diagonal from top to bottom?  Once I draw a diagonal with the online tool I am at loss to create 2 color split?

    How is - what cut you a rectangle in 2 colors with a diagonal from top to bottom?  Once I draw a diagonal with the online tool I am at loss to create 2 color split?

    Rosemary,

    A simple way would be to:

    (1) give the rectangle a color, then Ctrl > Cmd + C + F;

    (2) use the direct Selection tool, and then deselect (click and empty space), then click on the opposite corner to the part where you want to keep the color, then press DELETE, then change the fill color to the other.

    Or, you can ClickDrag with the line tool along the diagonal line from corner to corner (guides are your friends), select it all and Pathfinder > divide, then select live from the triangle where you want to change the color and change.

  • Recolor only wheel constantly change colors and color groups of color selections, rather than update the colors to work with new Illustrator CC 2015.

    Whenever I use the tool to work to redefine colors in Illustrator normal it shows just the colors of the selected artwork. It now automatically keeps showing groups of colors and rearrange the colors and their display oddly. When I click the pipette for "colors of the selected picture" it goes back to normal, but as soon as I close it and reopen it is goes back to color groups once again. Half the time, the colors do not yet exist in the work. The two background images are how its been looking and acting lately. The very last image at the bottom, this is how it was before the update. I use this 24/7 tool is incredibly frustrating, I know there are other ways to change the colors, but it's the quickest way to the type of work I do. Thanks for the replies!

    Screen Shot 2015-08-06 at 11.22.22 AM.pngScreen Shot 2015-08-06 at 10.55.42 AM.png

    NORMAL RECOLOR TOOL

    Screen Shot 2015-08-06 at 11.27.24 AM.png

    Click on the eyedropper in the top right to get the colors of the work.

    This is a workaround for now.

  • Using a LinearGradient CSS to create a color - LookUpTable

    I have a list of the values of procentual and I want the entries in a table view according to the values in this list of colors. So I want to use the colors defined by a lineargradient inside the style sheet.

    So, I need something like this:
    1. define a styleclass with a linearGradient procetual in the style sheet
    2. put an invisible Ray on the stage with a sufficient size for the required color resolution (100px for the resolution of 1%)
    3. set the styleclass according to for the line
    4. read the line colors according to values procentual to color the entries in the table - see.

    How can I implement step 4? Or is there another possibility to create a color look up table from a css gradient?

    Unfortunately, your solutions do not include the lineargradient to read starting from the style sheet.

    You already know how to do that because you posted the css for the style sheet in this thread.

    Is it possible to create a non-Visual lineshape with the styleclass gradient and use the Pixelreader to get the colors according to the pixelposition him?

    Yes. Create a component, set the values for the default size on this subject, apply your style sheet to it, place it in a scene newly created, that you place on a stage, take a snapshot of the scene and use the pixel reader to search for a pixel in the desired location in the snapshot.

  • The most effective way to create this color wheel?

    I know there are several ways to create a color circle, but in this case, there is a slight difference (ie. feature white) between the hidden images.

    I was wondering how you guys approached this creation. Thank you. Much appreciated!

    shutterstock_85920403.jpg

    The white line can be created by using the rotation tool or the transform command. In both cases, the degrees of rotation is determined by dividing the number of strokes by 360 degrees. Rotation tool, you can make a duplicate order to repeat the rotation, make sure that your rotation a copy not the original.

    Then it's you if you want the line color to match the background, or use the path search tools to cut the railways making individual piece of the wheel. This can be handy if you want to move a piece of the wheel outwards and resize it perhaps until drew attention to it.

  • Creating a color in InDesign Javascript (CC)

    Hi all:

    I use this code to try to create a color that can be used to fill a button:

    function MakeButtonColor()

    {

    var TheColor;

    var editable = app.activeDocument;

    var MonErreur;

    Try

    {

    TheColor = TheDocument.colors.item ("DPSButtonColor");

    var ColorName = TheColor.name;

    }

    catch (MyError)

    {

    TheColor = TheDocument.colors.add ({name: "DPSButtonColor", colorSpace:ColorSpace.RGB, model:ColorModel.process,colorValue:[0,137,208]});})

    }

    var ButtonColor1 = TheColor;

    Alert ("ButtonColor is" + ButtonColor1.name);

    }

    I am all that directly from the Scripting Guide with only a very few changes.

    But I never see the two last executed statements.   I tried all sorts of things to make this work and it won't work.

    Someone at - it ideas why this won't work and what I can do about it?

    Hi JADarnell,

    I just modified your code according to the directives of the Trevor mentioned lines. Try this!

    MakeButtonColor()
    function MakeButtonColor(){
       var TheColor;
       var TheDocument = app.activeDocument;
       var myError;
       try{
           TheColor = TheDocument.colors.itemByName("DPSButtonColor");
           var ColorName = TheColor.name;
           }
       catch(myError){
           TheColor = TheDocument.colors.add({name: "DPSButtonColor", space:ColorSpace.RGB, model:ColorModel.process,colorValue:[0,137,208]});
           }
       var ButtonColor1 = TheColor;
       alert("ButtonColor is " + ButtonColor1.name);
       }
    

    THX,

    csm_phil

  • create a color picker

    Hello

    How could I create a color picker inserted in a window?

    Thank you

    Fred

    Hello

    I remember this one looked more complicated than it is.

    The color picker is not a real after effects user interface, but it's an OS user interface. Is not in the SDK of EI, but in the SDK of ExtendScript (JavaScript Tools Guide)

    $.colorPicker (name)

    name: the color to be shortlisted in the dialog, as an RGB hex (0xRRGGBB) value, or - 1 for the default value of the platform.

    Return number

    defaultColor var = 0xff0000;

    var color = $.colorPicker (defaultColor);

    This is!

  • created the color profile loading

    Hello

    I had this problem before.

    I work with Imac end 2015 retina 4K and the operating system's EL Capitan.

    Photoshop CC 2015-5

    I created a new profile of color with a spyder 2 (I ordered a new color Munky, incidentally)

    and the software I used was Displaycal 5.

    When I open a file with overview of the Mac, the colors and the contrast is perfect.

    When I open the same file with the Adobe Bridge or Photoshop CC 2015 products

    the contrast is far from bright and the colors are not correct.

    Now, I guess to see the new file created color in bridge color settings according to a tutorial.

    But right now, I don't see the new color profile.

    In the workspaces from photoshop, I see the profile, but no matter what I do the photo are much to high heat.

    In the past with my old Mac and earlier versions of photoshop, I never had this problem.

    The colors and contrast have been even the glimpse of the I mac.

    I really hope you can help me.

    Thank you very much

    Richard

    View > proof > Monitor RGB turns off the whole display color management chain. It's his goal (insofar as it is never desirable). In short, turn off and leave it off.

    Different color-managed applications display differently, there is a problem with the display profile. All color management applications should display always the same, regardless of the profile/the document workspace. That is the question to have a color display managed pipeline.

    Redo the whole process, make sure you that have all the settings as you wish. I have not used Dispcal/Argyll in quite awhile, but it is a fairly large and complex software piece.

    A small difference between the apps that are color management and not, is normal and expected. What is the size that the difference is, depends on the characteristics of the screen in question.

    That said, the sensor Spyder 2 useless next with modern LED and wide range of displays, and despite this, the overall accuracy was not very good at first. So you can wait until you get the new sensor.

  • How to create a color?

    Hello

    All patched up FM12 Windows 8.1.

    I want to have the RGB color #2E74B5 to choose from. I tried or no success (see the video):

    1. Click on view > color definitions.
    2. Choose new color in the name list.
    3. The name of the color.
    4. Set the color in RGB.
    5. Enter my 2E74B5color value.
    6. The color I want shows in the new black box in the current zone.
    7. If I click on Create, Update, or fact, my color is not applied and my new color is black.

    Thoughts?

    See you soon,.

    Sean

    Hi Sean,.

    as far as I understand it is a bug, which was introduced in FM 12.0.4. According to the ReadMe 12.0.4 update has made several changes to the color dialog box:

    1. The following updates are implemented in the view-> color-> dialog Definitions:

      • The cursor moves according to the values entered in the red/green/blue text boxes.
      • The color Viewer is updated based on the value in the hex code of the color.
      • Now type integer RGB values instead of only the percentage values.

    I guess that somewhere in the mix of these three changes, certain values did not correctly defined. Also, I noticed that this isn't always falls back to the black, but 'last color. When you select first for example 'Forest Green' then 'new color', you start with RGB (33,138,33). Then paste it into 2E74B5 and click Update, and it will be for "Forrest Green".

    There is also another bug related to this: when you enter the Hex color code preview looks correct, cursors are defined, the RGB values are correct. Now just change the RGB values, and you will notice a 'very different' bruise will appear.

    Workaround solution:

    1. Create a new color.
    2. Type/paste in the HEX value. Don't forget the three specified RGB values (in your case: RGB (46,116,181)).
    3. Click on create. He returned to the black.
    4. Now, enter the three RGB values manually.
    5. Click Update.

    Or just directly enter the RGB values instead of a hexadecimal value.

    Solved in FrameMaker 2015:

    This bug has been fixed in FrameMaker version of 2015.

    See you soon,.

    * Stefan.

  • How do I create multi color boxes using CSS3

    OS - Windows 7 using DW Cs5.5

    I need to create a screen with many similarly sizes boxes colored with colors of text that will be easily visible in their breast.

    I have a class implemented as follows:

    {.yellowbox}

    do-family: "Lucida Sans Unicode", "Lucida Grande", without serif.

    font size: small;

    Color: #F00;

    background-color: #FC3;

    text-align: center;

    vertical-align: middle;

    margin: 4px;

    padding: 4px;

    Clear: none;

    float: left;

    height: 10em;

    Width: 30%;

    position: relative;

    border: thick solid #F00;

    }

    Appears in a box that is yellow with a red border.

    With a set of 9 divs in this class, I get 9 boxes arranged in a grid of 3 x 3 in a container wide 960px.

    How can I edit the CSS so that the background color changes with each box, and the color of the text is always in a color that is legible?

    First change the CSS as follows

    . Box {}

    do-family: "Lucida Sans Unicode", "Lucida Grande", without serif.

    font size: small;

    Color: #F00;

    text-align: center;

    vertical-align: middle;

    margin: 4px;

    padding: 4px;

    Clear: none;

    float: left;

    height: 10em;

    Width: 30%;

    position: relative;

    border: thick solid #F00;

    }

    . Yellow {}

    background-color: #FC3;

    }

    . Blue {}

    background-color: blue;

    }

    Then use the following tag

    or

  • I created the colors of special links, but they do not work

    Hello

    I referred to a previous discussion that I made to create special links that do not have the same colours as the standard page links. However, after going through the process, I do not understand why the special links do not work.

    My Web page is:

    http://alfierobertsinstitute.ca/aboutus.html

    My CSS is:

    http://alfierobertsinstitute.ca/CSS/layout.CSS

    My remote HTML code is:

    < ol id = "aboutUsList" >
    < li > < a href = "#AboutAlfieRoberts" class = "specialListLinks" > subject Alfie Roberts < /a > < /li >
    < li > < a href = "#ARIMission" class = "specialListLinks" > ARI Mission < /a > < /li >
    < li > < a href = "#ARIHistoricalTradition" class = "specialListLinks" > ARI history < /a > < /li >
    < li > < a href = "#ARIVisionandWorkingApproach" class = "specialListLinks" > ARI Vision and approach of work < /a > < /li >
    < li > < a href = "#ARIOrganizationalStructure" class = "specialListLinks" > Organizational Structure ARI < /a > < /li >
    < li > < a href = "#AbouttheARILogo" class = "specialListLinks" > on the ARI Logo < /a > < /li >
    < li > < a href = "#References" class = "specialListLinks" > References < /a > < /li >
    < li > < a href = "#FAQContactUs" class = "specialListLinks" > FAQ / contact us < /a > < /li >
    < /ol >

    My CSS code is:

    }
    {a.specialListLinks}
    color: #FFFFFF;
    text-decoration: none;
    }

    {a.specialListLinks:hover}
    color: #CCCCCC;
    }

    Thanks in advance for your help.

    M

    Your code works, but you are a victim of the specificity of CSS.

    This means that other rules in your CSS are carry on (considered more important than) the rule you are trying to use.

    My CSS code is:

    {a.specialListLinks}
    color: #FFFFFF;
    text-decoration: none;
    }

    {a.specialListLinks:hover}
    color: #CCCCCC;
    }

    is fine but there is also a generic one: rule of link defined elsewhere that overrides the first rule.

    Try

    My CSS code is:

    }
    {a.specialListLinks:link}
    color: #FFFFFF;
    text-decoration: none;
    }

    {a.specialListLinks:hover}
    color: #CCCCCC;
    }

    This makes the first more specific rule and it will be applied instead of the generic one: rule link.

  • What kind of lighting creates these color casts?

    I work with any color casts and am curious, generally, this type of lighting creates cool tones (blue/green) and what type creates tones (yellow/red)?

    Thank you.

    Talk you about real lighting when you take a picture or edit in Photoshop?

    In the case of the former Forum of photography can be an even better place for the question.

    http://forums.Adobe.com/community/design_development/photography

  • How to create a color image optimized vectors R, G and B IMAQ?

    Hello everyone, I have the R, G and B elements of an image RGB contained in three different vectors.

    I currently use the program as an attachment to get the color in IMAQ image.

    This program works perfectly, but I want a faster program without two nested loops.

    Is there a better solution in IMAQ?

    Best regards

    Max

    Perhaps you prefer to run 3 x IMAQ Replace Color Plane.

    I prefer - you have the layers of color in their native table 2D U8 form - using the LabVIEW join (because of the speed and wiring less) and write the resulting 2D table of the 32 in the image.  Performance is excellent - especially when the highlighting of the execution.

    If anyone has a better implementation: I'm interested in it.

  • Creating sectional color thanks to the black and white effect

    Hi all!

    Given the beautiful Muse model that uses Parallax scrolling, then at some point, there is what appears to be black and white images with sections of transparency showing the image color below. Someone know how to achieve this effect or maybe a tutorial that could point me in the right direction?

    Here is link to the model in question:

    Fashion Show Preview - ThemeForest

    Jody

    Hi Jody,.

    What kind of effects is applied through some specific widgets which are also made by-

    https://themeforest.net/item/fashion-show/5411127.

    Therefore, you should contact directly or either purchase their theme, as they are already patented.

    Or you can search all of this widget on Adobe Muse Widget Directory

    Kind regards

    Ankush

Maybe you are looking for