SetBackground(Color.WHITE) not working

I am trying to set background color to white, but it's not working. Can anyone find out the problem?
import java.io.*;
import java.util.*;
import java.awt.*;
import javax.swing.*;
import java.awt.font.FontRenderContext;
import java.awt.font.LineMetrics;
import java.awt.font.TextLayout;
import java.awt.geom.*;
public class Lab3ex2 {
     * @param args ignored
     public static void main(String[] args) throws IOException {
          // Station[] stations = new Station[100];
          // int n = 0;
          ArrayList<Station> stations = new ArrayList<Station>();
          ArrayList xPos = new ArrayList();
          ArrayList yPos = new ArrayList();
          final String fname = "C://Positions-v2.csv";
          BufferedReader br = new BufferedReader(new FileReader(fname));
          String stationName, item, line;
          line = br.readLine(); // first line skipped
          line = br.readLine(); // 2nd
          while (line != null) {
               StringTokenizer stoke = new StringTokenizer(line, ",");
               stationName = stoke.nextToken().trim();
               item = stoke.nextToken();
               float x = Float.parseFloat(item);
               item = stoke.nextToken();
               float y = Float.parseFloat(item);
               item = stoke.nextToken();
               String justification = item;
               // stations[n] = new Station(stationName, x, y);
               // n++;
               stations.add(new Station(stationName, x, y, justification));
               xPos.add(x);
               yPos.add(y);
               line = br.readLine(); // line 3,4,...
          for (Station station : stations) {
               System.out.println(station);
               //System.out.printf("%20s %6.1f,%6.1f)%n",station.name, station.x, station.y);
          System.out.print("Press enter...");
          System.in.read();
          JFrame f = new JFrame("Lab3ex2");
          f.add(new MyPanel(stations, xPos, yPos));
          f.setSize(500,400);
          f.setVisible(true);
          f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // to avoid needing ^C
class Station {
     public String name;
     public float x;
     public float y;
     public String justification;
     public Station(String name, float x, float y, String justification) {
          this.name = name;
          this.x = x;
          this.y = y;
          this.justification = justification;
     public String toString() {
          // todo: format x and y
          return name + " (" + x + "," + y + ")";
class MyPanel extends JPanel {
     private ArrayList<Station> stations;
     private float xMax, yMax;
     private ArrayList xPos;
     private ArrayList yPos;
     public void paintComponent(Graphics g) {
          Graphics2D g2 = (Graphics2D)g;
          Dimension dim = getSize();
          float xScale, yScale, scale, x, y, radius = 1.0f, diam;
          String justification = null;
          diam = 2.0f*radius;
          Shape s;
          xScale = dim.width/xMax;
          yScale = dim.height/yMax;
          scale = Math.min(xScale, yScale);
          g2.scale(scale, scale);
          g2.setStroke(new BasicStroke(1.0f/scale)); // thin lines
          g2.setFont(new Font("SanSerif", Font.PLAIN, (int)(11.2f/scale))); // always 12 approx
          int total = 0;
          for (Station st : stations) {
               if(st.name.length()>total)
                    total = st.name.length();
          for (Station st : stations) {
               x = st.x - radius;
               y = st.y - radius;
               justification = st.justification;
               s = new Ellipse2D.Float(x, y, 2.0f*radius, 2.0f*radius);
               g2.draw(s);
               g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                         RenderingHints.VALUE_ANTIALIAS_ON);
               if(justification.equals("R"))
                    g2.drawString(st.name, (x-st.name.length())-2, (y+diam));
               else
                    g2.drawString(st.name, (x+diam+radius), (y+diam));
GeneralPath theShape = new GeneralPath();
     theShape.moveTo((float)(Float)xPos.get(0), (float)(Float)yPos.get(0));
for(int i=0; i<15; i++)
     theShape.lineTo((float)(Float)xPos.get(i), (float)(Float)yPos.get(i));
g2.draw(theShape);
this.setBackground(Color.WHITE);
     public MyPanel(ArrayList<Station> stations, ArrayList xPos, ArrayList yPos) {
          this.stations = stations;
          this.xPos = xPos;
          this.yPos = yPos;
          xMax = -99999.0f;
          yMax = -99999.0f;
          for (Station st : stations) {
               if (st.x > xMax) xMax = st.x;
               if (st.y > yMax) yMax = st.y;
}

import java.io.*;
import java.util.*;
import java.awt.*;
import javax.swing.*;
import java.awt.font.FontRenderContext;
import java.awt.font.LineMetrics;
import java.awt.font.TextLayout;
import java.awt.geom.*;
* Advanced Java Lab 3 ex 2: reading and drawing Met station data
* @author rallen
public class Lab3ex2 {
      * @param args
      *            ignored
     public static void main(String[] args) throws IOException {
          // Station[] stations = new Station[100];
          // int n = 0;
          ArrayList<Station> stations = new ArrayList<Station>();
          ArrayList xPos = new ArrayList();
          ArrayList yPos = new ArrayList();
          final String fname = "C://Positions-v2.csv";
          BufferedReader br = new BufferedReader(new FileReader(fname));
          String stationName, item, line;
          line = br.readLine(); // first line skipped
          line = br.readLine(); // 2nd
          while (line != null) {
               StringTokenizer stoke = new StringTokenizer(line, ",");
               stationName = stoke.nextToken().trim();
               item = stoke.nextToken();
               float x = Float.parseFloat(item);
               item = stoke.nextToken();
               float y = Float.parseFloat(item);
               item = stoke.nextToken();
               String justification = item;
               // stations[n] = new Station(stationName, x, y);
               // n++;
               stations.add(new Station(stationName, x, y, justification));
               xPos.add(x);
               yPos.add(y);
               line = br.readLine(); // line 3,4,...
          for (Station station : stations) {
               System.out.println(station);
               // System.out.printf("%20s %6.1f,%6.1f)%n",station.name, station.x,
               // station.y);
          System.out.print("Press enter...");
          System.in.read();
          JFrame f = new JFrame("Lab3ex2");
          f.add(new MyPanel(stations, xPos, yPos));
          f.setSize(500, 400);
          f.setVisible(true);
          f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // to avoid needing ^C
class Station {
     public String name;
     public float x;
     public float y;
     public String justification;
     public Station(String name, float x, float y, String justification) {
          this.name = name;
          this.x = x;
          this.y = y;
          this.justification = justification;
     public String toString() {
          // todo: format x and y
          return name + " (" + x + "," + y + ")";
class MyPanel extends JPanel {
     private ArrayList<Station> stations;
     private float xMax, yMax;
     private ArrayList xPos;
     private ArrayList yPos;
     public void paintComponent(Graphics g) {
          super.paintComponent(g);
          this.setLayout(new FlowLayout());
          Graphics2D g2 = (Graphics2D) g;
          Dimension dim = getSize();
          float xScale, yScale, scale, x, y, radius = 1.0f, diam;
          String justification = null;
          diam = 2.0f * radius;
          Shape s;
          xScale = dim.width / xMax;
          yScale = dim.height / yMax;
          scale = Math.min(xScale, yScale);
          g2.scale(scale, scale);
          g2.setStroke(new BasicStroke(1.0f / scale)); // thin lines
          g2.setFont(new Font("SanSerif", Font.PLAIN, (int) (11.2f / scale))); // always
                                                                                                    // 12
                                                                                                    // approx
          int total = 0;
          for (Station st : stations) {
               if (st.name.length() > total)
                    total = st.name.length();
          for (Station st : stations) {
               x = st.x - radius;
               y = st.y - radius;
               justification = st.justification;
               s = new Ellipse2D.Float(x, y, 2.0f * radius, 2.0f * radius);
               g2.draw(s);
               g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                         RenderingHints.VALUE_ANTIALIAS_ON);
               if (justification.equals("R")) {
                    g2.drawString(st.name, (x - st.name.length()) - 2, (y + diam));
               } else {
                    g2.drawString(st.name, (x + diam + radius), (y + diam));
          GeneralPath theShape = new GeneralPath();
          theShape.moveTo((float) (Float) xPos.get(0), (float) (Float) yPos
                    .get(0));
          for (int i = 0; i < 15; i++) {
               theShape.lineTo((float) (Float) xPos.get(i), (float) (Float) yPos
                         .get(i));
          g2.draw(theShape);
          setOpaque(true);
     public MyPanel(ArrayList<Station> stations, ArrayList xPos, ArrayList yPos) {
          this.stations = stations;
          this.xPos = xPos;
          this.yPos = yPos;
          xMax = -99999.0f;
          yMax = -99999.0f;
          for (Station st : stations) {
               if (st.x > xMax)
                    xMax = st.x;
               if (st.y > yMax)
                    yMax = st.y;
          this.setBackground(Color.WHITE);
          this.setVisible(true);
}Edited by: swapnil_raverkar on Sep 21, 2008 5:10 AM

Similar Messages

  • JLabel.setBackground(Color.red) not working

    Hi, I am using the (JLabel) lblPrmf.setBackground(Color.RED), but the label is not colored. Here is my program:
    import java.util.*;
    import javax.swing.*; //JFrame and JPanel etc...
    import java.awt.*; //BorderLayout and Container etc....
    import java.awt.Color;
    import java.awt.event.*; //ActionListener og WindowAdapter
    public class AllVac extends JFrame
    //Define JLabel
    private JLabel lblDays;
    private JLabel lblAbs;
    private JLabel lblPrmf;
    //Define JButton
    private JButton month;
    private JButton back;
    private JButton forward;
    //Define JPanel
    private JPanel south;
    private JPanel north;
    public AllVac()
    // JFrame jf = new JFrame("Vacation for the Stavanger Team ");
    Container c = getContentPane();
    // c.setTitle("Vacation for the Stavanger Team ");
    c.setLayout(new BorderLayout());
    c.add(new ShowNorth(), BorderLayout.NORTH);
    c.add(new ShowSouth(), BorderLayout.SOUTH);
    pack();
    setVisible(true);
    addWindowListener(new Close());
    public static void main(String args[])
    AllVac a = new AllVac();
    public class ShowNorth extends JPanel
    public ShowNorth()
         north = new JPanel(new GridLayout(1, 3));
         month = new JButton("August 2006");
         back = new JButton("<<");
         forward = new JButton(">>");
         north.add(back);
         north.add(month);
         north.add(forward);
         add(north);
    public class ShowSouth extends JPanel
    public ShowSouth()
         int days = 31;
         south = new JPanel(new GridLayout(16, days+1));
    //Arrange the days
    for ( int i = 1; i<(days+1); i++)
    lblDays = new JLabel(" " + Integer.toString(i));
    lblDays.setBorder(BorderFactory.createLineBorder(Color.red));
    south.add(lblDays);
    add(south, BorderLayout.LINE_START);
    //Fill in the names and vacation days
    for ( int i = 1; i<(days+1); i++)
    lblAbs = new JLabel(" ");
    south.add(lblAbs);
    add(south, BorderLayout.LINE_START);
    for (int j = 0; j<14; j++)
    for ( int i = 1; i<days+1; i++)
    String v = "v";
    lblPrmf = new JLabel(" " + v + " ");
    lblPrmf.setBackground(Color.RED);
    lblPrmf.setBorder(BorderFactory.createLineBorder(Color.blue));
    lblPrmf.setBackground(Color.RED);
    lblPrmf.repaint();
    south.add(lblPrmf);
    add(south);
    public class Close extends WindowAdapter
    public void windowClosing(WindowEvent c)
    System.exit(0);
    }

    You are building a GUI with Swing components. Why would you ask the question in the general programming forum???? People there may never have built a GUI or heard of Swing.
    Concepts of creating GUI components adding then to a GUI, dealing with models, listening to events and responding to the events are all techniques related to GUI programming. Even Swing programming is different from AWT programming in some cases.
    So when you topic title says. "I have a problem, with a Swing (JLabel) component", or "How do I change a JTable in a JScrollPane" where do you think the question should be asked. Maybe its just me but I would think the Swing forum is where you would find the experts, or at least people who think they know something about Swing.
    Your previous posting on "display a button on a background image" was not very clear. You use an Applet and Panel which are an AWT components. But then you are also using JFrame and JButton which are Swing components. Since you posted the question in the general programming forum, I had no idea whether you where attempting to write an AWT or a Swing application so I ignored the posting.

  • JScrollPane.setBackground(Color.white);

    Hi @all,
    I want to make the BackgroundColor of my JScrollPane white. Does anybody know, why this little piece of code doesn?t do anything?
    I can compile it, but then the background is still grey.
    JLabel pic = new JLabel(new ImageIcon("dile_logo.jpg"));
    JScrollPane sp = new JScrollPane(pic, JScrollPane.VERTICAL_SCROLLBAR_NEVER,
    JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
    sp.setBackground(Color.white);          
    add(sp);
    thank you
    Juergen

    I tried:
    sp.setOpaque(true);
    and also:
    pic.setBackground(Color.white);
    but both does not change anything.
    @vaskol
    I have a picture that is smaller than the window and also as the scrollpane. So I do not have ScrollBars.
    The background of the picture is white and the rest of the window is grey and I want to change that to white.
    I do not understand what you mean with "that square in the corner" and also this part of your explication.
    Sorry
    Juergen

  • Hello! I'm using Aperture with Efex plugins and notice, what when I saving result in plugin and go back to aperture, preview mode is going to grey color and not working until I reboot Aperture. Did you saw this problem?

    Hello! I'm using Aperture with Efex plugins and notice, what when I saving result in plugin and go back to aperture, preview mode is going to grey color and not working until I reboot Aperture. What is intresting - in full screen mode everything works fine. Did you saw this problem?

    It seems there's a workaround here:
    https://discussions.apple.com/thread/5566037?tstart=0

  • Pick color feature not working properly -- how do I reset?

    Pick color feature not working properly -- how do I reset?

    You need to contact Adobe for you billing problem this is a user four not adobe customer support.
    For your Photoshop Problems this user community may be helpful. 
    Supply pertinent information for quicker answers
    The more information you supply about your situation, the better equipped other community members will be to answer. Consider including the following in your question:
    Adobe product and version number
    Operating system and version number
    The full text of any error message(s)
    What you were doing when the problem occurred
    Screenshots of the problem
    Computer hardware, such as CPU; GPU; amount of RAM; etc.

  • "Select Color Range" not working. "Warning: No pixels were selected" returned when attempting to use. Using Photoshop CS6 on a Mac running OS X Yosemite

    "Select Color Range" not working. "Warning: No pixels were selected" returned when attempting to use. Using Photoshop CS6 on a Mac running OS X Yosemite

    Here are three screenshots in succession from trying to perform the color selection:
    Dropbox - Screenshot 2015-02-12 14.57.40.png
    Dropbox - Screenshot 2015-02-12 15.00.14(2).png
    Dropbox - Screenshot 2015-02-12 15.01.00.png

  • Final Cut 6 and Color does not work

    Hello,
    I bought FInal Cut Pro Studio 2 and i receive the suite today and instal only apps ( no contents and loops )without problem
    Tried to open FCP6 and Color but not working.
    i launch FCP 6 or Color,2 jumps on dock and then quit.
    can be memory problem.( i have 768RAM on my imac G5 64VRAM)
    any pacth to resolv this problem?
    ps* SountrackPro 2,DVDStudio Pro,Motion3,LiveType,CinemaTools and Compressor woks fine in the same computer
    Computer configuration
    IMac G5 1.6 with 64VRAM and 768RAM
    thx in advance

    Ok,forgot Color,but and about final cut 6 ? why does not work?
    max resolution 1440x900.
    i was looking the systen requirements on fcp page
    Minimum Requirements to Install All Final Cut Studio Applications
    Final Cut Pro 6
    Macintosh 1.25GHz or faster PowerPC G4, PowerPC G5 = OK
    1GB of RAM = NO,my iMac have 768RAM
    1024-by-768 resolution or higher OK
    Mac OS X v10.4.9 or later OK
    QuickTime 7.1.6 or later OK
    A DVD drive for installation OK
    Can i deduce that problem is because i don't have RAM enought?
    THX

  • Secondary color correction not working in Premiere CC

    Greetings,
    I'm unable to build secondary color correction masks in Three Way Color Corrector, RGB Curves etc in the current version of Premiere CC.
    In any of these plugins, when I check "show mask" I get the usual white slate filling the frame. But when I use the color picker to make a selection the whole frame stays white. It appears that I'm making selections but it's not building the mask for some reason. When making an extreme color change I can see that the mask is not building as it affects the whole frame.
    This started after upgrading to CC. I've recently updated to the most up to date version (yesterday) and am still having the same problem.
    Premiere CC 2014.1 Release
    8.1.0 (81) Build
    Macbook Pro Retina, 15" Late 2013
    2Gh Intel Core i7
    8Gb
    Intel Iris Pro 1536Mb
    Yosemite Version 10.10
    *note-my Colleague is not having this problem, he's working on the same OS and same CC build but he has an Imac. So I'm guessing this problem is unique to my hardware config.
    Anybody else have this problem or know of a fix?

    I have the same Problem new MAC OS Premier Pro CC or Premier Pro CS6 both have an issue with the Title Tool. If you open the title tool and try to make color changes or change size of the font it sticks at the default color and default font. SOmetimes the title tool will work and then when I exit it's back to the default first type location, default font and default color. Sometimes it will not even let me exit the Title Tool.
    Please help I have Projects I'm working on Deadlines and I pay a monthly Fee for Software that works and it's not working.
    Model Name:          Mac Pro
      Model Identifier:          MacPro5,1
      Processor Name:          6-Core Intel Xeon
      Processor Speed:          2.4 GHz
      Number of Processors:          2
      Total Number of Cores:          12
      L2 Cache (per Core):          256 KB
      L3 Cache (per Processor):          12 MB
      Memory:          16 GB
    Software  OS X 10.9 (13A603)
    Graphics  ATI Radeon HD 5770 1024 MB

  • Select Color Range not Working

    i have been using adobe photoshop for over 10 years and suddenly, when i try to select color range, nothing is showing up as selected. even with a simple black and white image, with white or black as the sampled color, nothing gets selected. i don't if something changed in the application or if it is somehow not working correctly on mine. please help.

    Hi,
    What version of photoshop and operating system are you using?
    Nothing seems to be selected in the preview or when you actually exit color range?

  • Header background color does not work

    Hi,
    I would like to change the background color of the header element, but it does not work as I imagined
    First of all, here is the HTML:
    <body>
    <div id="wraper">
      <header>
        <h1><span>Pacific</span> Coastal Highway</h1>
        <nav>
          <ul>
            <li>Home</li>
            <li>Big Sur</li>
            <li>Pfeiffer Beach</li>
            <li>Elephant Seals</li>
            <li>Morro Bay</li>
          </ul>
        </nav>
      </header>
      // ... some other HTML elements & content ...
    </body>
    So, within <header> element we have <h1> and <nav> elements, and within that <nav> element there is a list that is actually menu.
    Here it CSS code that refers to these elements:
    #wraper {
        width: 1200px;
        background-color: #FFFFFF;
        margin-left: auto;
        margin-right: auto;
        margin-top: 0px;
        border-right: 1px solid #000000;
        border-left: 1px solid #000000;
    body {
        margin: 0;
        background-color: #CBD2FB;
        font-family: "OpenSans Regular", "Gill Sans MT", Arial, "Times New Roman", sans-serif;
        color: #202020;
        background-image: -webkit-linear-gradient(270deg,rgba(135,167,207,1.00) 0%,rgba(204,217,234,1.00) 11.91%,rgba(232,238,245,1.00) 25.91%,rgba(202,212,220,1.00) 100%,rgba(0,0,0,1.00) 100%,rgba(135,167,207,1.00) 100%,rgba(138,169,207,1.00) 100%,rgba(135,167,207,1.00) 100%,rgba(202,212,220,1.00) 100%);
        background-image: -moz-linear-gradient(270deg,rgba(135,167,207,1.00) 0%,rgba(204,217,234,1.00) 11.91%,rgba(232,238,245,1.00) 25.91%,rgba(202,212,220,1.00) 100%,rgba(0,0,0,1.00) 100%,rgba(135,167,207,1.00) 100%,rgba(138,169,207,1.00) 100%,rgba(135,167,207,1.00) 100%,rgba(202,212,220,1.00) 100%);
        background-image: -o-linear-gradient(270deg,rgba(135,167,207,1.00) 0%,rgba(204,217,234,1.00) 11.91%,rgba(232,238,245,1.00) 25.91%,rgba(202,212,220,1.00) 100%,rgba(0,0,0,1.00) 100%,rgba(135,167,207,1.00) 100%,rgba(138,169,207,1.00) 100%,rgba(135,167,207,1.00) 100%,rgba(202,212,220,1.00) 100%);
        background-image: linear-gradient(180deg,rgba(135,167,207,1.00) 0%,rgba(204,217,234,1.00) 11.91%,rgba(232,238,245,1.00) 25.91%,rgba(202,212,220,1.00) 100%,rgba(0,0,0,1.00) 100%,rgba(135,167,207,1.00) 100%,rgba(138,169,207,1.00) 100%,rgba(135,167,207,1.00) 100%,rgba(202,212,220,1.00) 100%);
    h1 {
        margin-top: 0px;
        font-size: 48px;
        text-shadow: 1px 1px 2px #969696;
        padding-top: 32px;
    h1, h2, h3 {
        font-family: "Prociono Regular", "OpenSans Regular", "Gill Sans MT", "Times New Roman", Arial;
        color: #507AAD;
        text-align: center;
    h1 span {
        position: relative;
        top: -37px;
        left: 35px;
        font-family: GoodDog, Arial, "Times New Roman", "Gill Sans MT", sans-serif;
        font-size: 47px;
    header nav ul {
        margin-right: auto;
        margin-left: auto;
        list-style-type: none;
        padding-left: 0px;
        width: 705px;
        /* [disabled]margin-bottom: 10px; */
    nav ul li {
        float: left;
        padding: 10px;
        display: block;
        width: 110px;
        text-align: center;
        background-color: #A9A3FF;
        border-right: 1px solid #FFFFFF;
        border-radius: 23px;
        background-image: -webkit-linear-gradient(270deg,rgba(135,167,207,1.00) 0%,rgba(204,217,234,1.00) 60.11%);
        background-image: -moz-linear-gradient(270deg,rgba(135,167,207,1.00) 0%,rgba(204,217,234,1.00) 60.11%);
    background-image: -o-linear-gradient(270deg,rgba(135,167,207,1.00) 0%,rgba(204,217,234,1.00) 60.11%);
        background-image: linear-gradient(180deg,rgba(135,167,207,1.00) 0%,rgba(204,217,234,1.00) 60.11%);
        margin: 18px 5px;
    And, finally, here's how it looks:
    Now, I'd like to change the background color of the <header> element (to chage that white behind that <h1> and menu into some other color), so I just added the background color of the <header> element in CSS:
    header {
        background-color: #FF2D31;
    But, here is how it looks now:
    As you can see, although <nav> element with list (menu) is IN <header> element - the background color of <header> is just behind <h1> element.
    Do you know why it's happening, and what would be the best way to solve this problem?
    Thank you in advance.

    Ben Pleysier wrote:
    The problem is caused when floated children do not force the parent element to clear the floats.
    Nancy O. wrote:
    It may seem counter-intuitive but overflow:hidden prevents margin collapse on parent elements containing floats:
    The magic of “overflow: hidden” — Articles — Colin Aarts, freelance web developer
    I'm trying to figure out what happened (and why) in my example, where the problem occurred, but...
    I tried with inspecting elements with Firebug - to see what's what in case when there isn't overflow:hidden property that is related to <header> element in this example from the first post:
    As you can see in the picture - <header> element is only that blue area containing <h1> element, and although <nav> element (with the <ul> element inside) is IN <header> element - it is not shown within the blue area, as it is not within <header> element.
    As for the <h1> element which is inside of the <header> element, when I select it - it looks like this:
    Now, purple area indicates the padding-top of <h1> element, and I guess that yellow area which indicates the margin is actually browser's default margin of the <h1> element.
    Next, confusing is when I select <nav> element:
    Although <nav> element is selected - there is no that blue area indicating where is that element on the web-page... ?
    Next, when I select <ul> element, there is only yellow area indicating margin -  I guess that yellow area which indicates the margin is actually browser's default margin of the <ul> element.
    When I select <li> element - it's the same case as with <nav> element there is no that blue area indicating where is that element on the web-page... ?
    Finally, when I select <a> element - it looks like this:
    All in all - inspecting all <header> element and the elements within it didn't help me to see what and why this is happening (with the background color of the header element). I think the problem is in me, I'll wait a few days and maybe then things become clearer in my mind
    Sorry for my bad English.
    Again, thank you all!

  • Color controls not working correctly

    Why do swatches suddenly not show in the conrol panel? When the object and document are brand new it works, then randomly goes into the stuck mode where if I click on the fill box I get a choice of only no fill or resgistration. I can work around this using the colors panel or color picker, but often the color picker goes haywire too. At that point the file is corrupted and there's no going back. Restarting the program and computer do not help. What's going on?

    As I recall, I had been working with 3 separate images, 2 originally grayscale and 1 RGB, that I had live traced (as above, without placing the image in a new ai file). One of the grayscale images let me use the color picker to change fill color, bu not consistenly, and the other one would let me type in values and changed colors on the picker, but only showed shades of gray in the fill box and in the image. The RGB file wouldn't let me change the fill color using swatches, but I don't remember what I tried with the picker.
    I think I'm going to chalk it all up to my original mistake of not placing the image in a new file, and subsequently trying everything I could think of to work around the original problem.

  • Photoshop color field not working in color picker

    My color field is not working properly in my color picker. How do you fix this?
    WRONG (what my color picking is doing) :
    CORRECT (how it should work) :

    The catchall first step in correction is to reset the tool which, in this case, is the Eyedropper.
    With the Eyedropper chosen, right click here:
    If that doesn't solve the problem, a logical next step would be to reset your Preferences.
    To reset Preferences:
    If Photoshop is already open on your screen, close it (Quit). Then hold down Shift+Ctrl+Alt (Win) / Shift+Command+Option (Mac) on your keyboard and start Photoshop.
    A dialog box will pop up asking if you want to delete the existing Preferences file (the "Settings"). Click Yes in the dialog box. The existing Preferences file will be scrapped and a new one will be created.

  • Color Libraries not working anymore

    Hi,
    I was creating an .acb (adobe color book) file to access my company's colors from the color picker's color libraries section and everything was going well. It was all working, I've been using it for some time, and then I decided to change the name of my library in the coding.
    After that the color libraries stopped working. Not only my color library, but the color library function in Photoshop. Now when I try to access the color libraries section from the color picker, it simply closes the color picker. It doesn't give me any error message. Photoshop doesn't crash or anything, it's only that I can't access the color libraries section.
    I tried removing my .acb file from the \Adobe Photoshop CS2\Presets\Color Books folder, but it didn't solve the problem. The color libraries still won't open.
    Anyone knows a solution to this problem. It's kind of urgent since I need that color library file working for a tool I'm developping for my company.
    Would there be someplace in Photoshop that I could reset Photoshop's color libraries to start from scratch and go back to my old version of the .acb file that was working perfectly, before I changed it's name?
    Right now I'm using Photoshop CS2, I should be switching to Photoshop CS3 soon, but I'd like to have a solution to make sure the same problem doesn't happen on CS3.
    Thanks.

    Hi OldBob,
    Thanks for your reply. Actually, I haven't had to try your solutions because for some reason the problem is fixed now. All I did was modify again the code name of my color books to something else and put them back in the color books folder and it got back to life. It still doesn't explain why the problem wasn't fixed when I deleted them from the folder, so I guess if it happens again I'll try your solutions to see if it helps.
    Thanks!

  • PS CS6 Smartobject - Changing color space not working

    If I initially open a smartobject from ACR into PS CS6 using one color space, eg. sRGB, should it then be possible to click back into ACR and change color space to Adobe RGB ???
    This is important to me, since working most of the time in sRGB, batch editing lot's of files (for timelapse-video, hence sRGB), but sometimes it may be nessecary to go back and use Adobe RGB to make a best possible print of one of the stills.
    This is not working for me. I thought I should be able to do absolutely non-destructive editing when working with smartobjects from ACR, but this may seem to not be the case.
    Ole

    I understand now that a copy of the original RAW file is made when working with SO.
    Still, when checking what color space I am working in (in PS CS6), after changing from sRGB to aRGB, PS still tells me I am working in sRGB!!
    So what I am asking, going back from a SO in PS, into ACR, to change the color space, does not work.
    Is there a workaround for this?
    Or is it something I still do not understand here?

  • Color replacement not working as expected

    Hello -
    I'm touching up some artwork and I've tried using both the color replacement tool as well as the color replacement adjustment and neither is giving me the results I would expect.
    The image has been indexed and I'm not using anti-alias so it's pretty easy to select the colors I want to change and the ones I want to replace them with.
    However, when I try to change the color, it's not replacing it with the exact color that I selected but a lighter version of that color instead.
    I created an example to show what I am talking about.
    In the example I used the color replacement tool.
    First I eyedropped the color I want to put in place of the wrong color.
    Then I use the color replacement tool (mode: color, sampeling: once) and click and drag over the wrong color.
    Instead of matching the color in the foreground (that I had eyedropped) it replaces it with a lighter version of the foreground color.
    I was having the same problem when I was using the replace color adjustment.
    Please see the attached file for my example.
    I was able to get the effect I was looking for by first using mode: color then switching to mode: luminocity and going over the same area a second time.
    It would seem that there should be a way to do it in one pass.
    Any help is appreciated.

    That is the way the color replacement tool works, its an old tool.  Color has three parameters, say hue, saturation and lightness (luminosity) as one parameter set. You would need to change all three for the kind of match you are looking for. The color replacement tool lets you change in one click either Hue, or Saturation, or both of these (Color) or Luminosity. In other words ther is no setting for all three. For that you need two applications of the tool.
    You should try the color range command on a separate layer with a mask to protect those areas of that color you want to keep and see if that fits your needs.
    Paulo

Maybe you are looking for