Documentation of 'org.jzy3d.colors.Color' Java class
Color
org.jzy3d.colors

Class Color



  • public class Color
    extends java.lang.Object
    Color interface.

    The Color interface provide a representation of a color, independant from the target Window Toolkit (AWT, SWT, etc).

    • Constructor Summary

      Constructors 
      Constructor and Description
      Color(float r, float g, float b)
      Initialize a color with an alpha channel set to 1.
      Color(float r, float g, float b, float a)
      Initialize a color with values between 0 and 1.
      Color(int r, int g, int b)
      Initialize a color with an alpha channel set to 255.
      Color(int r, int g, int b, int a)
      Initialize a color with values between 0 and 255.
    • Field Detail

      • BLACK

        public static final Color BLACK
        Black color.
      • WHITE

        public static final Color WHITE
        White color.
      • GRAY

        public static final Color GRAY
        Gray color.
      • RED

        public static final Color RED
        Red color.
      • GREEN

        public static final Color GREEN
        Green color.
      • BLUE

        public static final Color BLUE
        Blue color.
      • YELLOW

        public static final Color YELLOW
        Yellow color.
      • MAGENTA

        public static final Color MAGENTA
        Magenta color.
      • CYAN

        public static final Color CYAN
        Cyan color.
      • COLORS

        public static final Color[] COLORS
      • rng

        public static java.util.Random rng
      • r

        public float r
      • g

        public float g
      • b

        public float b
      • a

        public float a
    • Constructor Detail

      • Color

        public Color(float r,
                     float g,
                     float b)
        Initialize a color with an alpha channel set to 1.
      • Color

        public Color(int r,
                     int g,
                     int b)
        Initialize a color with an alpha channel set to 255.
      • Color

        public Color(float r,
                     float g,
                     float b,
                     float a)
        Initialize a color with values between 0 and 1.
      • Color

        public Color(int r,
                     int g,
                     int b,
                     int a)
        Initialize a color with values between 0 and 255.
    • Method Detail

      • mul

        public void mul(Color factor)
      • alphaSelf

        public Color alphaSelf(float alpha)
      • toHex

        public java.lang.String toHex()
        Return the hexadecimal representation of this color.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • clone

        public Color clone()
        Overrides:
        clone in class java.lang.Object
      • toArray

        public float[] toArray()
      • negative

        public Color negative()
      • negativeSelf

        public Color negativeSelf()
      • random

        public static Color random()
      • color

        public static Color color(int c)
        Returns one of the main color based on id. Use id%(#colors)

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.