Class Color

java.lang.Object
com.bitwig.extension.api.Color

public class Color extends Object
This class represents an RGBA color with each component being stored as double.
Since:
API version 5
  • Method Details

    • fromRGB

      public static Color fromRGB(double red, double green, double blue)
    • fromRGBA

      public static Color fromRGBA(double red, double green, double blue, double alpha)
    • fromRGB255

      public static Color fromRGB255(int red, int green, int blue)
    • fromRGBA255

      public static Color fromRGBA255(int red, int green, int blue, int alpha)
    • fromHex

      public static Color fromHex(String hex)
    • mix

      public static Color mix(Color c1, Color c2, double blend)
      Mixes two colors.
      Since:
      API version 4
    • toHex

      public String toHex()
    • nullColor

      public static Color nullColor()
    • blackColor

      public static Color blackColor()
    • whiteColor

      public static Color whiteColor()
    • getRed

      public double getRed()
    • getGreen

      public double getGreen()
    • getBlue

      public double getBlue()
    • getAlpha

      public double getAlpha()
    • getRed255

      public int getRed255()
    • getGreen255

      public int getGreen255()
    • getBlue255

      public int getBlue255()
    • getAlpha255

      public int getAlpha255()
    • toHSV

      public void toHSV(double[] hsv)
      Parameters:
      hsv - array of length 3. On return, the array will be set to {h, s, v} with 0 invalid input: '<'= h invalid input: '<'= 360, 0 invalid input: '<'= s invalid input: '<'= 1 and 0 invalid input: '<'= v invalid input: '<'= 1.