Change graphic color programatically

How can I programatically change the color of a canvas grahpic?
Thanks.

Hi Robin,
I don't know why this works now, but I changed my test script to place the image in the script, then change the color and it works (which is more like the way I'm going to use it in production). With my first test I was trying to change the color of the tif file that I had manually placed on the page.
Thanks,
Archie
Below is test script that works.
Rem ColorTest.vbs
Set myInDesign = CreateObject("InDesign.Application.CS3")
Set myDocument = MyInDesign.ActiveDocument
myFile = "X:\SCANNED_ART\1659418-100.tif"
Rem Get Color of Text
Set myTextFrame = myDocument.textFrames.item("text")
myTextContents = myTextFrame.Texts.Item(1).Contents
myTextColor = myTextFrame.Texts.Item(1).fillColor
Rem Place Graphic
Set myGraphic = myDocument.Pages.Item(1).Place (myFile)
Set myGraphic = myGraphic.Item(1)
MsgBox "Graphic Placed"
Rem Set Color
myGraphic.fillColor = myDocument.Colors.Item(myTextColor)

Similar Messages

  • I have two graphics workers on osx 8.  They are both complaining that their files are changing label colors on it own.  Any idea what could cause this?

    I have two graphics workers on osx 8.  They are both complaining that their files are changing label colors on it own.  Any idea what could cause this?

    and there were and have been problems with any two nvidia cards which was the main part of my question.
    To provie details try pasting all but serial number from system profile. Sorry but Mac Pro tells me nothing, not model, year, or what graphic card it came with or updated with.

  • How to change the color of a basic graphic texture?

    The basic graphic texture pattern is black by default. I'm looking for a way to change the color of the black lines that create the texture.
    I read How do I change the color of Basic Graphic Lines? However, I am unable to select the black pattern lines with the direct selection tool and thus unable to change the color of the lines.
    Thanks in advance.

    all 14 views are from me refreshing
    can anyone recommend a better forum?

  • Programatically changing the color of buttons on LV OI

    Hi,
    I've modified the sample Operator Interface shipped with TestStand.
    Buttons are linked to subsequences, so when a button is pushed a subsequence is running (boolean buttons).
    What I would like to achieve is that, once a subsequence was called and the result was OK (pass) then the color of the button should change to green.
    If the subsequence is failed then the button should change to red.
    Thanks for any suggestions in advance.
    Solved!
    Go to Solution.

    Hi,
    You can find an example in Example Finder: "Property Nodes.vi" . It shows how you can change any properties for an object from your program.
    You can find more examples on zone.ni.com, like these:
    - Using Property Nodes to Change the Color of a Slide Bar https://decibel.ni.com/content/docs/DOC-2133
    - Programatically Change the Color and Visibility of a Boolean using Property Nodes https://decibel.ni.com/content/docs/DOC-16569
    Regards,
    Peter Vago
    AE Hungary

  • How do I change the color of Basic Graphic Lines?

    I used the basic graphic lines in the swatch library - (swatch libraries>patterns>basic graphics>basic graphics lines) to fill a retangle.  My question is, can I change the colors of the lines?  I have tried everything I know and can't seem to figure it out.  Does anyone have any suggestions?

    Almost answered - Thank you.  The problem I am having is, I was able to drag the swatch onto the artboard and change the colors, but I am not able to drag the new colored one back to the swatch panel.  All the swatches in that panel are black and white by default I guess.  These are stock swatches. I am working on a PC if that makes a difference.  I click the swatch with the selection tool and drag (control>drag?) and I get the little box with the + sign in it when I try to drag, but it bounces back.  Any Suggestions.  I am a total amature at this program, and am basically self taught.

  • How to change text color in CS4

    Hey everyone. I know I'm not fluent in Dreamweaver, but had DW8 before upgrading to CS4 and I'm pretty handy with it. In version 8, if I wanted to change a text color, I simply highlighted the text and picked a color. No worries.
    However in CS4, I seem to be only have that ability in my CSS properties, (not HTML properties). Then when I try to change the color, it gives me a dialogue box asking questions such as "new CSS", "for this page only", etc. and I don't understand what I'm supposed to do.
    Can someone tell me in a user-friendly way (step-by-step), how to simply change a text color on a page? I went to the help topics and it said to use the 'color-picker', but that takes me back to my original problem.
    I'm either doing something terribly wrong, or ADOBE has made a simple task into brain surgery!
    Thanks in advance for assistance!
    Mark

    Beginning with CS3, DW became more compliant with W3C web standards which call for content (HTML) being separate from style (CSS).  Thus you now have two properties boxes: one for HTML content and another for CSS styles.
    Create a few CSS classes using the CSS style panel.
    CSS:
    .red {color: red}
    .blue {color: blue}
    .green {color: green}
    Highlight a word or sentence on your page and apply the appropriate class to your HTML.
    HTML:
    <p class="red"> this is red text</p>
    <p class="blue"> this is blue text with <span class="green">GREEN WORDS</span> in the middle</p>
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb
    http://alt-web.blogspot.com

  • Is it possible to change the color of the text in one specific field?

    If I want to make someone's mobile number show up as the primary contact, is it possible to make the text for that number a different color or make it bold? I can't seem to find a way to do it.
    Thanks.

    Make a Shape > Inspector > Graphic > Tinted Image Fill > Scale to fit > browse to image > click on the color patch to change the color to what you want
    or
    Drag in an image > overlay it with a Shape > select the color for the shape and change its Opacity
    Shapes may have Gradient and Advanced Gradient (multiple colors) fills both linear and radial. Both are in the Graphic Inspector as is Opacity.
    Peter

  • How do I change a color to another in a bitmapData image?

    Let's say you have an image of a cartoon human that is wearing a blue jacket with white sleeves, blue shoes, and grey pants. Brown hair and biege skin tone.
    (My project actually has 1300 of these images - 325 are blue cloths, 325 are red cloths, 325 are green cloths, and 325 are purple cloths)
    I am having a major problem with file size and memory usage due to all the images, so I have been asked to see if there was a way I could programmatically change the clothing color... this way we can use any color we want, and only have 325 base images.
    I have been trying to play with color matrix filter and color transform, but I can't seem to get the hang of it
    Is there a way I can extract only the "blue" colors from the image and do a hue shift on it to the color that I want it to be without effecting the non-blue colors?
    My idea was something along the lines of:
    Copy the "blue" color channel, hue shift it, then merge it back into frame....

    Oh boy... this seems to be an issue with your manager wanting it done 'NOW' rather than 'CORRECTLY'.
    For my original statement to work, the clothing would have to be seperated from the people - as per your suggestion to them - which would make your lives a whole lot easier.  The problem with hue shifting the entire image is --> it will hue shift the entier image = all colors, and that may not be the best solution in your situation.
    I would suggest replacing the pixel color (eg. getPixel32 and setPixel32 for the size of the image) but it seems that the shoulders and shoes have a darker color tone than the rest of the body.
    Secondary solution:
    Import one of the image into Flash and do a bitmap trace of the image. 
    Seperate the clothes and people there. 
    Add the clothes as a new movie clip and change the color on a few frames 5 or so different colors (so its not too much work)
    Show them an example of how 'easy' it is to change the colors CORRECTLY when the images are seperate (even in the same file)
    The secondary will give them the 'all in one file' they requested... and also give you solid grounds for convincing them to change the graphics.
    Hope this helps.  Other wise... its a long not so nice solution which will go over budget because they did not plan for this before they made the graphics.

  • HT2513 Is it possible to change the color scheme of a Microsoft Exchange calendar in iCal?

    My Exchange account is running 2007 version software.  I tried Control+Click and Go To Info (like I do for my iCloud calendars), but the Info menu does not pop up.  Any ideas why?

    Make a Shape > Inspector > Graphic > Tinted Image Fill > Scale to fit > browse to image > click on the color patch to change the color to what you want
    or
    Drag in an image > overlay it with a Shape > select the color for the shape and change its Opacity
    Shapes may have Gradient and Advanced Gradient (multiple colors) fills both linear and radial. Both are in the Graphic Inspector as is Opacity.
    Peter

  • Is it possible to change the color of imported art in pages, say from B&W to a color?  ... or even to make it a gradation of color?

    Is it possible to change the color of imported art in pages, say from B&W to a color?  ... or even to make it a gradation of color?

    Make a Shape > Inspector > Graphic > Tinted Image Fill > Scale to fit > browse to image > click on the color patch to change the color to what you want
    or
    Drag in an image > overlay it with a Shape > select the color for the shape and change its Opacity
    Shapes may have Gradient and Advanced Gradient (multiple colors) fills both linear and radial. Both are in the Graphic Inspector as is Opacity.
    Peter

  • How to change button colors in a loop?

    I am working on a task that should imitate an elevator. I have two vertical
    rows of round buttons "Up" and "Down" When a circle is selected randomly by
    the program, the circle becomes yellow and the elevator moves to that
    button.
    Here is what I did:
    1. created a class Circle where I save buttons' parameters
    2. saved Circle objects in an array
    3. drew the buttons depending on their parameters
    4. generated a random number, matched it with an array index and assigned
    the object color to yellow.
    Everything is fine except that I can't figure out how to change colors of my
    buttons in a loop.
    import javax.swing.*;
    import java.awt.*;
    import java.util.*;
    public class Elevator3 extends JPanel
    private int n = 40;
    private int width = 200;
    private int floors = 10;
    private int interval = 1000;
    private boolean selected = false;
    private Circle[] buttons = new Circle[2*(floors-1)];
    public Elevator3()
    build();
    JFrame frame = new JFrame("Elevator3");
    setBackground(Color.WHITE);
    setFont(new Font("SansSerif", Font.PLAIN, Math.round(n/3)));
    frame.getContentPane().add(this);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.setSize(width, n*(floors+2) );
    frame.setVisible(true);
    public void build()
    Random r = new Random();
    int buttonPick;
    int timeUntilNextButton = r.nextInt(interval);
    for (int k =0; ; k++)
    if (timeUntilNextButton-- ==0)
    buttonPick = r.nextInt(2*(floors-1));
    //populate my buttons array here - how??
    timeUntilNextButton = r.nextInt(interval);
    //adding "Down" buttons
    for (int i=1, count=0; i < floors; i++, count++)
    if (count == buttonPick)
    selected = true;
    else
    selected = false;
    buttons[count]= new Circle(n*2, n*i, selected, Math.round(n/2));
    //build an array of "Up" circles
    for (int i=2, count=floors-1; i < floors+1; i++, count++)
    if (count == buttonPick)
    selected = true;
    else
    selected = false;
    buttons[count]= new Circle(n, n*i, selected, Math.round(n/2));
    public static void main(String[] args)
    new Elevator3();
    protected void paintComponent(Graphics g)
    super.paintComponent(g);
    //draw buttons
    for (int i=0; i < buttons.length; i++)
    g.setColor(buttons.getColor());
    g.fillOval(buttons[i].getX(), buttons[i].getY(), buttons[i].getWidth(), buttons[i].getWidth());
    class Circle
    private int x;
    private int y;
    private Color c;
    private boolean pressed;
    private int width;
    public Circle(int xCoordinate, int yCoordinate, boolean selected, int diameter)
    x = xCoordinate;
    y = yCoordinate;
    pressed = selected;
    width = diameter;
    if (pressed)
    c = Color.YELLOW;
    else
    c = Color.LIGHT_GRAY;
    public Color getColor()
    return c;
    public int getX()
    return x;
    public int getY()
    return y;
    public int getWidth()
    return width;

    hi,
    am sorry, i couldn't make out what exactly the problem, but as ur subject line says...
    may be the code give below will help you to change button colors in a loop..
              for(int i = 0; i < button.length; i++){
                   int color1 = (int)(250*Math.random());
                   int color2 = (int)(250*Math.random());
                   int color3 = (int)(250*Math.random());
                   Color c = new Color(color1,color2,color3);
                   button[i] = new JButton("button name");
                   button.addActionListener(this);
                   //to check the r, g, b combination.
                   //System.out.println(c);
                   button[i].setBackground(c);
                   button[i].setForeground(Color.white);
    //adding into the panel
                   panel.add(button[i]);
    hope this would help you.

  • Can you change the color of an image without changing it in photoshop first?

    I have created a link for Indesign using Photoshop. It is basically a plain black graphic that is placed over an aerial to highlight the represented water. It is possible to change the color of this graphic without actually going back into photoshop?

    Another option is to make a path around the image, so that you have a vector shape with full control over fill and transparency.
    You can do the path in Ps, save as clipping path, bring into InD, position, convert clipping path to frame, select and delete content, fill, fade...
    It may be easier to do the path in InD, but perhaps accurate positioning over the area you're after would be an issue.

  • How do I change the colors of Ring texts individually so when it pulls down, I can see each test with different background color?

    I have been using LabView for a almost 18 months now. There was no problem which I could not solve with help of all resources available. But, this is one where I am scratching my head since long time now.
    I would like to change colors of each individual text in Ring control programmatically. I have attached example VI. In this VI, I change background color of ring text, but it changes only the current (active) background color, so when you pull down the whole menu, it shows same default color for all the text background (not even the color I asked it to). Is there anyway I can define individually as to what color should be related to each text in ring menu?
    Attachments:
    Ring Menu Colors.JPG ‏16 KB
    RGB Ring.vi ‏33 KB

    " Is there anyway I can define individually as to what color should be related to each text in ring menu?"
    Well not with a ring and not programatically.
    The best I can suggest is a picture ring, see below.
    Ben
    Message Edited by Ben on 11-18-2005 02:16 PM
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction
    Attachments:
    Picture Ring.JPG ‏5 KB

  • How can I change the colors of a photo?

    How can I change the colors in a photo?

    No. You'd need an external editor for that kind of stuff:
    In order of price here are some suggestions:
    Seashore (free)
    The Gimp (free)
    Graphic Coverter ($45 approx)
    Acorn ($50 approx)
    Pixelmator ($50 approx)
    Photoshop Elements ($75 approx)
    There are many, many other options. Search on MacUpdate or the App Store.
    You can set Photoshop (or any image editor) as an external editor in iPhoto. (Preferences -> General -> Edit Photo: Choose from the Drop Down Menu.) This way, when you double click a pic to edit in iPhoto it will open automatically in Photoshop or your Image Editor, and when you save it it's sent back to iPhoto automatically. This is the only way that edits made in another application will be displayed in iPhoto.
    Of course, you may not want to change the shape of a photo which would distort it. You may want to print it in an oval shape but undistorted. I'd use a page layout app like Pages for that,

  • Gantt chart- How to change the color of time bars of different versions

    Hi All,
    My Client wants to see all changes in planning schedule. I made different versions of these changes but he also want to see all these changes in gantt chart and in different colors. I tried to change the color in planning board assistant but in this screen (CJ27/ CJ2B). we cannot view all versions together. And if I use CN41, there I cannot change the colors of time bars.
    Secondly, we can change colors of times bars of basic dates, forecast dates and actual dates but there is no provision to change the colors of schedule bars of different project versions. Kindly reply-
    1. How to see all project versions in CJ27 or How to customise bar chart in cn41 or if we change in SPRO, then how to change graphic profile in project info profile
    2. How to change colors of different time bars of different versions.
    3. How to mention these legends (meaning of each color in chart) at footer of gantt chart (in print outs)
    Please Help.
    Thanks & Regards
    Dinesh Chauhan

    Thanks,
    actually I've created new project planning board profile where planning board assistant is customized but unable to use this profile in CN41. we can change PS info profile in CN41 and that;s why I thought that planning board profile may be assigned somewhere in PS info profile so that changes in planning board assistant will be applied in CN41 through PS info profile. Graphic profile is too complex to understand and not sure if it will help to get colored time bars of projct versions in gantt chart. Still not clear.
    Secondly not able to see all versions (snap shots) in gantt chart with different colors of time bars.
    I mean planning board screen can be customized but we cannt see different versions here which are possible in CN41, but we cannt customize the gantt chart (time bars) in CN41. Pls help.
    Thx & Regards
    Dinesh Chauhan

Maybe you are looking for

  • Photoshop Elements 5.0 User Manual

    I would appreciate it if someone could tell me how to download a copy of the photoshop elements 5.0 user manual? I tried to get this from the website and searched forever to no avial. Plse and thanks very much!

  • The internal camera on my macbook air stopped working.

    The internal camera on my macbook air stopped working. The camera is non available in settings also. Please help.

  • Why do folders not hold more than 9 app's

    have apple suddenly gone against there sliding style, Why a max of 9 in a group you should allow unlimited and scroll them left to right or up and down. Is there only me that finds that annoying i like to have all my games the games group Message was

  • Issue with creating new change request

    Hi We have implemented charm and we are using the workcenters for people to be able to access and create new change requests. When i click on the link to create a new change request it takes me to the screen to create a new one and it shows a New Cha

  • Random Green Frames in Premiere Render and Export Files

    Hello! I just switched a new MacBook Pro and am having a render issue in Premiere CC. Random green frames pop up sporadically throughout my video. This happens both on my rendered timeline and in the exported file. It seems to affect the clips with h