Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6317840

JColorChooser should display hex colour number

XMLWordPrintable

      A DESCRIPTION OF THE REQUEST :
      Previously someone asked to allow hex in the JColorChooser and was rejected. My request is more modest, that the hex colour number merely be displayed non-editable on the three JColorchooser panels.




      JUSTIFICATION :
      That effectively lets you select using hex, and export colors to Java source, css etc. It can done with with 20 lines of code.

      I waste so much time converting these numbers by hand and making errors. Many customers are trying to match HTML colours or uses matching colours in HTML. They don't even know how to covert the hex.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      I just want the hex colour number displayed ideally is a way I can copy paste somewhere else.
      ACTUAL -
      All you see are the decimal colour numbers.

      ---------- BEGIN SOURCE ----------
        Color newColor = JColorChooser.showDialog( this,"Choose Color",textArea.getBackground() );
         
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Use a hex calculator, which can no longer be found in stores.

            malenkov Sergey Malenkov (Inactive)
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: