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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(int col) voiddarken(float amount) darkenCopy(float amount) voiddesaturate(float amount) desaturateCopy(float amount) floatgetAlpha()intfloatgetBlue()intfloatgetGreen()intintgetHex()floatgetRed()intintgetRGB()intgetRGBA()voidinvert()voidvoidlighten(float amount) lightenCopy(float amount) voidmultiply(float r, float g, float b, float a) multiply(int col) static Colorof(int col) voidsaturate(float amount) saturateCopy(float amount) voidsetHue(float hue) static voidtickRainbow(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()
-