Class TintColor

java.lang.Object
me.desht.pneumaticcraft.client.util.TintColor

public class TintColor extends Object
Since we can't use java.awt anymore, this copies the functionality we need from java.awt.Color
  • Field Details

  • Constructor Details

    • TintColor

      public TintColor(int r, int g, int b, int a)
    • TintColor

      public TintColor(float r, float g, float b, float a)
    • TintColor

      public TintColor(int red, int green, int blue)
    • TintColor

      public TintColor(int rgb)
    • TintColor

      public TintColor(int rgba, boolean hasalpha)
  • Method Details

    • getRGB

      public int getRGB()
    • getRed

      public int getRed()
    • getGreen

      public int getGreen()
    • getBlue

      public int getBlue()
    • getAlpha

      public int getAlpha()
    • RGBtoHSB

      public static float[] RGBtoHSB(int r, int g, int b, float[] hsbvals)
    • HSBtoRGB

      public static int HSBtoRGB(float hue, float saturation, float brightness)
    • brighter

      public TintColor brighter()
    • darker

      public TintColor darker()
    • getHSBColor

      public static TintColor getHSBColor(float h, float s, float b)
    • getComponents

      public float[] getComponents(float[] compArray)
      Get color components as a float array, ARGB format
      Parameters:
      compArray - input float array, may be null; if not null, must be a float[4]
      Returns:
      resulting float array of ARGB components