public class ColorTools
extends java.lang.Object
Color objects.| Constructor and Description |
|---|
ColorTools() |
| Modifier and Type | Method and Description |
|---|---|
static java.awt.Color |
darken(java.awt.Color color,
int byPercent) |
static java.awt.Color |
desaturate(java.awt.Color original,
int percentage)
a very simple implementation that assumes r,g,b to be equivalent to luma, so we don't have to convert RGB to HSV
in order to reduce the saturation level.
|
static java.awt.Color |
lighten(java.awt.Color color,
int byPercent) |
static java.awt.Color |
lightenDarken(java.awt.Color color,
int byPercent,
boolean darken) |
public static java.awt.Color desaturate(java.awt.Color original,
int percentage)
original - the original color to desaturatepercentage - the percentage by which the color should be desaturatedpublic static java.awt.Color lighten(java.awt.Color color,
int byPercent)
public static java.awt.Color darken(java.awt.Color color,
int byPercent)
public static java.awt.Color lightenDarken(java.awt.Color color,
int byPercent,
boolean darken)
Copyright © 2000-2026 OAshi S.à r.l. All Rights Reserved.