public final class ColorUtil
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static org.joml.Vector4f |
half(org.joml.Vector4f color)
Used to obtain half color from source.
|
static org.joml.Vector4f |
halfRGB(org.joml.Vector4f color)
Used to obtain half color from source.
|
static org.joml.Vector4f |
negativeColor(org.joml.Vector4f color)
Used to create negative color for provided color.
|
static void |
negativeColor(org.joml.Vector4f color,
org.joml.Vector4f dest)
Used to create negative color and set it to dest.
|
static org.joml.Vector4f |
negativeColorRGB(org.joml.Vector4f color)
Used to negotiate only rgb part.
|
static org.joml.Vector4f |
negativeColorRGB(org.joml.Vector4f color,
org.joml.Vector4f dest)
Used to create negative color and set it to dest.
|
static org.joml.Vector4f |
oppositeBlackOrWhite(org.joml.Vector4f color)
Used to return black or white color based on source color.
|
static org.joml.Vector4f |
oppositeBlackOrWhite(org.joml.Vector4f color,
org.joml.Vector4f targetColor)
Used to return black or white color based on source color.
|
static org.joml.Vector4f |
randomColor()
Used to generate random color.
|
public static org.joml.Vector4f negativeColor(org.joml.Vector4f color)
color
- color to negotiate.public static void negativeColor(org.joml.Vector4f color, org.joml.Vector4f dest)
color
- color to negotiate.dest
- target color object to set.public static org.joml.Vector4f negativeColorRGB(org.joml.Vector4f color)
color
- color to negotiate.public static org.joml.Vector4f negativeColorRGB(org.joml.Vector4f color, org.joml.Vector4f dest)
color
- color to negotiate.dest
- target color object to set.public static org.joml.Vector4f half(org.joml.Vector4f color)
color
- source color.public static org.joml.Vector4f halfRGB(org.joml.Vector4f color)
color
- source color.public static org.joml.Vector4f oppositeBlackOrWhite(org.joml.Vector4f color)
color
- color to find opposite black or white color.public static org.joml.Vector4f oppositeBlackOrWhite(org.joml.Vector4f color, org.joml.Vector4f targetColor)
color
- color to find opposite black or white color.targetColor
- color to set result.public static org.joml.Vector4f randomColor()