Class TintColor
java.lang.Object
me.desht.pneumaticcraft.client.util.TintColor
Since we can't use java.awt anymore, this copies the functionality we need from java.awt.Color
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbrighter()darker()intgetAlpha()intgetBlue()float[]getComponents(float[] compArray) Get color components as a float array, ARGB formatintgetGreen()static TintColorgetHSBColor(float h, float s, float b) intgetRed()intgetRGB()static intHSBtoRGB(float hue, float saturation, float brightness) static float[]RGBtoHSB(int r, int g, int b, float[] hsbvals)
-
Field Details
-
WHITE
-
BLACK
-
-
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
-
darker
-
getHSBColor
-
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
-