Class ColorUtils
java.lang.Object
ActiverseUtils.ColorUtils
ColorUtils - Utility functions for color manipulation
- Version:
- 1.4.1
- Author:
- Knivier
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ColorBlends two colorsstatic ColorDarkens a color by a percentagestatic ColorhsvToRgb(float hue, float saturation, float value) Creates a color from HSV valuesstatic ColorLightens a color by a percentagestatic float[]Converts RGB to HSVstatic ColorSets the alpha (transparency) of a color
-
Constructor Details
-
ColorUtils
public ColorUtils()
-
-
Method Details
-
darken
-
lighten
-
blend
-
withAlpha
-
rgbToHsv
Converts RGB to HSV- Parameters:
color- RGB color- Returns:
- float array [hue (0-360), saturation (0-1), value (0-1)]
-
hsvToRgb
Creates a color from HSV values- Parameters:
hue- Hue (0-360 degrees)saturation- Saturation (0.0-1.0)value- Value/brightness (0.0-1.0)- Returns:
- RGB color
-