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

Add static methods to Color to convert RGB components into RGB color value

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P5 P5
    • None
    • 5.0
    • client-libs
    • x86
    • windows_xp

      A DESCRIPTION OF THE REQUEST :
      Could you please add the following functions to java.awt.Color? They take the components of a color and calculate the coresponding color integer value.

      public static int getRGB(float red, float green, float blue);
      public static int getRGB(float red, float green, float blue, float alpha);
      public static int getRGB(int red, int green, int blue);
      public static int getRGB(int red, int green, int blue, int alpha);


      JUSTIFICATION :
      This will eliminate the need to create new color objects simply to convert component into into the coresponding color.
      ###@###.### 2005-07-01 12:34:48 GMT

            dav Andrei Dmitriev (Inactive)
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: