Package foundry.veil.api.client.color
Class Color
java.lang.Object
foundry.veil.api.client.color.Color
A simple color class that can be used to represent a color in RGBA format with utility functions.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionadd
(int col) void
darken
(float amount) darkenCopy
(float amount) void
desaturate
(float amount) desaturateCopy
(float amount) float
getAlpha()
int
float
getBlue()
int
float
getGreen()
int
int
getHex()
float
getRed()
int
int
getRGB()
int
getRGBA()
void
invert()
void
void
lighten
(float amount) lightenCopy
(float amount) void
multiply
(float r, float g, float b, float a) multiply
(int col) static Color
of
(int col) void
saturate
(float amount) saturateCopy
(float amount) void
setHue
(float hue) static void
tickRainbow
(int ticks, float partialTick)
-
Field Details
-
CODEC
-
WHITE
-
BLACK
-
RED
-
GREEN
-
BLUE
-
CLEAR
-
VANILLA_TOOLTIP_BACKGROUND
-
VANILLA_TOOLTIP_BORDER_TOP
-
VANILLA_TOOLTIP_BORDER_BOTTOM
-
-
Constructor Details
-
Color
public Color(float r, float g, float b, float a) -
Color
public Color(float r, float g, float b) -
Color
public Color(int r, int g, int b, int a) -
Color
public Color(int r, int g, int b) -
Color
public Color(int hex) -
Color
public Color(int hex, boolean hasAlpha) -
Color
public Color() -
Color
-
-
Method Details
-
of
-
tickRainbow
public static void tickRainbow(int ticks, float partialTick) -
lerp
-
setHue
public void setHue(float hue) -
getRed
public float getRed() -
add
-
getGreen
public float getGreen() -
getBlue
public float getBlue() -
getAlpha
public float getAlpha() -
getRedInt
public int getRedInt() -
getGreenInt
public int getGreenInt() -
getBlueInt
public int getBlueInt() -
getAlphaInt
public int getAlphaInt() -
getHex
public int getHex() -
getHexStr
-
mix
-
mixCopy
-
lighten
public void lighten(float amount) -
lightenCopy
-
darken
public void darken(float amount) -
darkenCopy
-
saturate
public void saturate(float amount) -
saturateCopy
-
multiply
-
multiply
-
desaturate
public void desaturate(float amount) -
desaturateCopy
-
invert
public void invert() -
invertCopy
-
getRGB
public int getRGB() -
getRGBA
public int getRGBA()
-