Fill color for new layer in Ph cs4 js

One more question. I need to make a  layer white. Here what I tried and it doesn't work:
var  myWhiteLayer = doc.artLayers.add();
myWhiteLayer.name =  "WHITE  LAYER";
var myWhite = new CMYKColor ();
myWhite.cyan  = 0.0;
myWhite.magenta = 0.0;
myWhite.yellow = 0.0;
myWhite.black  =0.0;
myWhiteLayer.fillColor = myWhite;
Thank you  for your help.
Yulia

var  myWhiteLayer = doc.artLayers.add();
myWhiteLayer.name =  "WHITE  LAYER";
var myWhite = new CMYKColor();
myWhite.cyan  = 0.0;
myWhite.magenta = 0.0;
myWhite.yellow = 0.0;
myWhite.black  =0.0;
doc.selection.selectAll();
doc.selection.fill(myWhite);
doc.selection.deselect();

Similar Messages

  • Can I set a "default color" for new layers?

    I find myself constantly changing the color of new layers back to my favorite: Magenta. Is there a way to just make this the default new layer color?
    I understand the reasoning of using different colors for each layer, but so many standard colors do not preview well, with the artwork, I find them useless. I'd just as soon use one color.

    I have a hotkey for an action creating a new layer but unfortunately the layer color option cannot be recorded in the action. What I do is create a bunch of layers I would eventually need, select all of them in the Layers panel and double click on the selection to open the options dialog where I can change the layer color for all at once.

  • How can I change the default fill and stroke colors for new shapes?

    As you can see in the following screen recording, after I change the stroke and fill color, all my subsequent rectangles are created respecting these new colors. But then when I delete all the rectangles, choose the rectangle shape tool once again, and start creating new rectangles, they start getting created with another color I had used some time ago (and I don't know how did it become the default color).
    http://tinypic.com/r/64jrwp/6
    So how can I change the defaults, so that the fill color is say #ddd, and the shape has no stroke at all?
    Thanks.

    When you have the shape tool selected you will see in the tool bar below - file edit etc a fill and stroke. This is where you can change the colours.
    You can keep drawing your shapes like you did in the video but then select the rectangle and change the colour from this tool bar. The reason it changes will be because you changed the colours you were using (foreground / background) that display in the left side tool bar.

  • Automatic Fill colors for Report Builder pie charts and graphs are too repetitive and hard to differentiate

    I have pie charts or other graphs that show multiple results (7-20).  I set the "fill" colors to Automatic so that the results are dynamic (I don't want to specify a color for each result because I will then be limited that those results--I
    prefer it to be dynamic).
    I noticed that once you get above 4 or 5 results, no matter which palette is used, the "automatic" colors are so closely similar that it is hard to differentiate which color pertains to which result (group).  For example, you could have a
    reports that breaks the results into age groups like 1-18, 19-21, 22-25, 26-30, 31-41, 41-50, 51-65, 66-80, and 81+.  By the time you review the results, there's likely to be 3 pairs of colors (or more) that are so closely similar that you can't
    tell them apart (2 shades of yellow, 3 shades of blue, 2 shades of orange, or green, or teal, or purple or whatever).
    Is there a way to use Automatic for the color scheme (I don't care which color pertains to which category) but also specify to not use colors that seem to bleed together (so that someone viewing the report can actually tell the difference)?  Using SSRS
    2008 Report Builder, if it makes a difference.

    Hi JNehman,
    Reporting Services provides a list of predefined, built-in palettes that you can use to define a color set for series on your chart. All built-in palettes contain between 10 and 16 color values. You cannot extend the built-in palette to include more colors,
    so if you need more than 16 colors, you must define a custom palette.
    A custom palette let you add your own colors in the order you want them to appear on the chart. A custom palette is especially helpful if the number of series in your chart is unknown at design time. For more information, see
    Define Colors on a Chart Using a Palette (Report Builder and SSRS).
    Regards,
    Heidi Duan
    Heidi Duan
    TechNet Community Support

  • Changing default text color for new emails

    My wife has decided that she wants all of her out going messages to be in a blue 18 pt font. I figured out how to get the 18 pt font, but can't find how to chaneg the default text color. Any help would be appreciated.

    Changing your SIP domain will effect both Lync 2010 and 2013 (it happens at the top level). 
    Here is some information on doing this: http://blog.insidelync.com/2013/06/anatomy-of-a-sip-domain-change/ 
    I'd suggest getting it right prior to adding in your Lync 2013 topology, just for the sake of simplicity. 
    Rather than changing your SIP domain, is simply adding an additional SIP domain an option? 
    If this helped you please click "Vote As Helpful" if it answered your question please click "Mark As Answer"
    Georg Thomas | Lync MVP
    Blog www.lynced.com.au | Twitter
    @georgathomas
    Lync Edge Port Check (Beta)
    This forum post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Naming new layer in Illustrator CS4 js

    Hi, I have this piece of code and it works, but it doesn't assign the name to the layer (green text). Could you please see what I am doing wrong:
    var myLayer = app.activeDocument.layers.add("Guides");
    var myLeftGuide = myLayer.pathItems.add();
    myLeftGuide.setEntirePath(Array(Array(13.5,0), Array(13.5,1000)));
    myLeftGuide.guides = true;
    Thank you so much for your help.
    Yulia

    Yulia:
    The layer's add method does not take a name as a parameter.  Try this:
    var myLayer = app.activeDocument.layers.add();
    myLayer.name = "Guides";
    Cheers!
    ---GJW

  • Assign default colors to new layer

    hello,
    Is there a way to assign one of the default layer colors with javascript? like light blue, light red, or green.

    yes I can assign colors, but I'm just wondering if you can assign defauil UI colors from the layers option pallete, not custom colors. it's not important, just wondering.
    I'm guessing No, since I don't see any UIColor tag like in indesign.

  • Fill color not same as color picker

    Hey there, thanx for any help i can get... here is my problem... i am working in cmyk - U.S. Web Coated (SWOP) v2... i need to get a specific red and so i am going to print some tests...
    c 0
    m 100
    y 90
    k 0
    i entered these values into my color box and then made a selection on a new layer... when i fill the selection with the color the new layer reads:
    c 0
    m 100
    y 89
    k 0
    Every time... dont know what my problem can be... could it be a screen calibration issue... however i recalibrate every month.
    thanx again for any suggestions.!

    Some kind of rounding error looks like. CMYK always uses percentage when in fact its using a scale of 0 to 255, in each channel.
    Behaves the same way for me too. I remember slight discrepancies like this in my CMYK days.  The color can be CORRECTED to 0.100.90.0, but like you say choosing this as a foreground and filling, results in an incorrect yellow value by one point. CMYK profile is irrelevant.
    Take a curve and pull the yellow 100 input to 99. Honestly in the real wolrld printing is so inaccurate that single percentage values make no difference.

  • Creating a new layer request...

    Does anyone know of a plugin that when creating a new layer, the name of the layer is immediately editable or which brings up a dialog window prompting you to name it, as in photoshop and illustrator?
    This would really speed things up.
    Thanks,

    Yeah I knew that but it means you gotta use the mouse to click on it which just a pain all the time. I avoid using the mouse whenever possible.
    I was hoping a new layer with the name immediately editable could be done with one gesture.
    For example in photoshop, you do the short cut for new layer which is ⌥⌘N and that brings up a window with the layer name immediately editable. No mouse needed.
    Thanks for your help anyway!

  • Setting a default color for messages in Mail

    I figured out how to change the default font & font size in messages in the Mail application, and how to change the color in my signature, however I cannot figure out how to set the default color for new messages?

    Hi,
    Look at the Mail's preferences, under Composing. Select where you like to save notes and todos.

  • Fill color not bound by paths???

    Greetings. For some reason unknown to me, when I select a fill color for an object, the fill color expands beyond the boundary of the object. I've tried working with the pathfinder tools, specifically the Unite function as well as the Object, Group function with still no luck. Although they may appear as one outline, many of the strokes were laid seperately which is why I thought the Group and Unite functions would be the key. BTW, Almost forgot, tried the Compound path function as well which did alter the area of the fill but wasn't able to control it(fill) though. Any ideas how to accomplish a simple fill within the boundaries of a complex object?
    Please help... already spent several hours trying to figure this out on my own.

    Best way to do this is make the outline one path then the toes are drawn over that path now you fill only the foot path.
    Since the toe divider lines are on top of the foot path you do not have to restack the paths.

  • CS4 - New layer won't show added color overlay, gradient, patterns?

    I'm using CS4 Extended for a few years... its been working fine but all of a sudden my layers are blank? I've tried Google but can't find a solution. Started a new graphic for a label using a 300dpi resolution, 23.250" inches wide and 2.500" high. Filled it with Black, then attempted to create a new layer to create a semi-transparent pattern above the black. It shows up in the layers column but the actual new layer doesn't show up on the artwork workspace. I can add text in color as a new layer, but the pattern layer doesn't show. Went and tried using an existing file... old layers work fine, but try to add any new layer other than text and it doesn't show. I know this is something dumb that I somehow clicked on and I'll kick myself when somebody tells me to check.... whatever LOL.
    Thanks in advance and don't laugh.

    Does the ext directory have the php_oci8.dll? In the original steps the PHP dir is renamed. In the given php.in the extension_dir looks like it has been updated correctly. Since PHP distributes php_oci8.dll by default I reckon there would be a very good chance that the problem was somewhere else. Since this is an old thread I don't think we'll get much value from speculation.
    -- cj

  • [AS] CS3- Find any text with style, then replace that text with a new applied fill color.

    I am trying to find the simplest way in cs3 to find any text with style, then replace that text with a new fill color. I can find text and change text. I can find a style and change it to a new style. I can't seem to find a style and change the applied fill color. I do not want to change the properties of the style, just the applied color. Yes, I want the + sign, for now. I know, why not update the style, I am not allowed to. Any help would be great. Since the search is not available, I need a new response.
    Thanks.

    You can work around the bug by just doing a find, then looping through the<br />results, changing the color one at a time. It'll be a fraction slower, but<br />should do the trick:<br /><br />tell application "Adobe InDesign CS3"<br />    set find text preferences to nothing<br />    set properties of find text preferences to {applied paragraph style:"The<br />name"}<br />    set theFinds to find text document 1<br />    repeat with i from 1 to count of theFinds<br />        set properties of item i of theFinds to {fill color:"Replace color"}<br />    end repeat<br />end tell<br /><br />The bug is fixed in CS4, BTW.<br /><br />-- <br />Shane Stanley <[email protected]><br />AppleScript Pro Florida, April 2009 <a href=http://scriptingmatters.com/aspro>

  • Fill color of shapes in layer

    How can i fill the color (solid) of shapes within an layer? For now I got:
    function getLayer(name)
        return app.activeDocument.layers.getByName(name);
    function fillSelection(hex)
        var layer = getLayer('Background');
        app.activeDocument.activeLayer = layer;
      app.activeDocument.selection.selectAll();
        var selection = app.activeDocument.selection;
      var sColor =  new SolidColor;
      sColor.rgb.hexValue = hex;
      app.activeDocument.selection.fill(sColor);
      app.activeDocument.selection.deselect();
    But this is not working if i create a rectangle in the "Background"-Layer. (even not if its converted to smart object or rasterized...).
    Thank you!

    A rectangle in the background layer OK:
    // A Script by JJMack's
    // enable double-clicking from Mac Finder or Windows Explorer
    #target photoshop // this command only works in Photoshop CS2 and higher
    // bring application forward for double-click events
    app.bringToFront();
    // ensure at least one document open
    if (!documents.length) {
      alert('There are no documents open.', 'No Document');
    // if at least one document exists, then proceed
    else {
      main();
    // main - main function
    function main() {
      try {
      var startRulerUnits = app.preferences.rulerUnits;
      app.preferences.rulerUnits = Units.PIXELS; // tell ps to work with pixels
      var Width = activeDocument.width.value;
      var Height = activeDocument.height.value;
      // declare local variables
      var layers = activeDocument.layers;
      activeDocument.activeLayer = layers[layers.length-1] // Target Bottom Layer
      if ( !activeDocument.activeLayer.isBackgroundLayer ) {
      app.activeDocument.artLayers.add()
      // declare local variables
      var newlayers = app.activeDocument.layers;
      // arrange layers so new layer added is at bottom
      newlayers[0].move(newlayers[newlayers.length-1], ElementPlacement.PLACEAFTER);
      // Make it a Background Layer
      activeDocument.activeLayer.isBackgroundLayer=1
      fillColor = new SolidColor;
      fillColor.rgb.red = Math.random() * 255
      fillColor.rgb.green = Math.random() * 255
      fillColor.rgb.blue = Math.random() * 255
      app.activeDocument.selection.selectAll();
      app.activeDocument.selection.fill(fillColor);
      app.activeDocument.selection.deselect();
      fillColor.rgb.red = Math.random() * 255
      fillColor.rgb.green = Math.random() * 255
      fillColor.rgb.blue = Math.random() * 255
      var selectedRegion = Array(Array(.1 * Width, .1 * Height), Array(.9 * Width, .1 * Height), Array(.9 * Width, .9 * Height), Array(.1 * Width, .9 * Height));
      app.activeDocument.selection.select(selectedRegion);
      app.activeDocument.selection.fill(fillColor);
      app.activeDocument.selection.deselect();
      app.preferences.rulerUnits = startRulerUnits;
      // display error message if something goes wrong
      catch(e) { alert(e + ': on line ' + e.line, 'Script Error', true); }

  • Color Balance Adj Layer Characteristics Changed from CS4- CS5?

    Maybe some guru with better connections to Adobe knows the answer to this. (or maybe I just forgot).
    I just discovered (and I don't think it is pilot error) that the characteristic behavior of the Color Balance Adjustment Layer is different in CS5 than it was in CS4/CS3.  (Much stronger in CS4/CS3).
    In addition, there is also an associated behavior that is like a buried legacy mode that is not made visible to the user.  Here is what I mean.
    If I create an image in CS4  with a single Color Balance Adj Layer, I get an adjusted image.
    If I open that same PSD file in CS5, the same image is displayed.
    If I use the same base image, yet create the Color Balance Adj Layer from within CS5, the adjusted image is different than the prior two.   So the Color Adjustment Layer acts like it has a hidden legacy mode where the characteristics are one type if created in CS4/CS3 yet a different characteristic if created in CS5.
    My mind might be slipping (or my cold has the better of me) because I do not remember this as a documented change and I searched the internet for "What's new in CS5" etc etc.  I don't remember anything on other forums about this either.
    I guess the good news is, the new characteristic of the Color Balance Adjustment Layer is better behaved with a transfer curve with less clipping for highlights and shadows.  Very similar to the better behavior of the change of the Brightness/Contrast Adjustment Layer going from CS2 to CS3.
    Here are some comparison images.
    This is the Layer Stack Used with Base Image of simple B to W gradient with CB Layer on top with just the highlights pegged to red.  This is the exact same Layer Stack for all of the images shown:
    Here is the first image.  This was created in PS CS4 and displayed from CS4 with the conditions show above:
    This is the same image from above that was saved as PSD with profile and them imported to PS CS5 with same profile.  There was no change:
    This next image is using the same base gradient, yet then creating the CB Layer from within PS CS5 with the same parameters, only the Red pegged for the Highlights:
    Does someone have an easy answer for this.  Can someone duplicate this and confirm the change from CS4 to CS5.  A test by someone else would either confirm I am off base with pilot error or there is something to this.
    And yes, all the images were sRGB and kept in sRGB for creation/display.  All Screenshot images were the images brought up side by side on the same color managed monitor.   All Edit > Color Settings were identical.
    Thanks in advance for any help
    John

    OK, Chris, but before I perform my act of self flaggelation for the benefit for all and my extra embarrassment, let me add in some useful information about the Color Balance Adj Layer that could be helpful.
    I was working with another individual who wanted a better understanding the color balance adj layer, what is was exactly doing, how the shadows, midtones, and highlights interacted, and the differences with preserve luminosity checked or not, and also why the preserve luminosity was so hard to predict (e.g. did not really preserve luminoisty).
    Without going into the deails of all of that, the tidbit I will leave as far as penance for my stupid original post above is that the Color Balance Adj Layer with the Preserve Luminosity box checked does a reasonable job or preserving luminoisty for the midtone adjustments yet definitely does not for the shadow and highlight adjustments.
    An easy workaround for this is to just set the Color Balance Adj Layer Blend to Color which preserves Luminosity of the image presented from lower layers while maintaining the Color as best it can from using the CB Adj Layer  (It holds the Hue and does its best to keep the same Saturation yet the Luminoisty from the presented image from lower layers takes prescendence).  This does a much better job at preserving Luminosity than using the checkbox option.    I usually use this approach and keep the Preserve Luminiosity box turned off.
    The error that I made was during the fairly involved exchange with this other individual, at some point I accidentally set the Layer Mask for the CB Adj Layer to 50% gray and did not notice that it had changed from the default white.  Much further down the line, when this other individual could not exactly recreate my results, he mentioned working in CS3. Thinking this odd,  I pulled up CS3, created the image from scratch (without the erroneous mask change to 50% gray) so therefore I duplicated his results and did not realize the error was in my original Layer Stack.  To make a long story short, I went and checked for differences in all system settings, profiles, Color Settings, opacity settings, Blend settings, Layer Style settings (and their options) etc, etc and overlooked a change in the Mask gray level.        When I quickly flashed back and forth between the two documents/stack it finally popped out at me. Mea Culpa.

Maybe you are looking for