Java Utililty Methods Color Lighten

List of utility methods to do Color Lighten

Description

The list of methods to do Color Lighten are organized into topic(s).

Method

Colorlighten(Color color)
lighten
return lighten(color, colorComponentChangeFactor);
Colorlighten(Color color, double strength)
lighten
int red = (int) ((color.getRed() * (1 - strength) / 255 + strength) * 255);
int green = (int) ((color.getGreen() * (1 - strength) / 255 + strength) * 255);
int blue = (int) ((color.getBlue() * (1 - strength) / 255 + strength) * 255);
return new Color(red, green, blue);
Colorlighten(final Color color, final int amount)
Lightens of the desired amount the given color.
int red = (color.getRed() + amount > 255) ? 255 : color.getRed() + amount;
int green = (color.getGreen() + amount > 255) ? 255 : color.getGreen() + amount;
int blue = (color.getBlue() + amount > 255) ? 255 : color.getBlue() + amount;
Color colorLightened = new Color(red, green, blue);
return colorLightened;
Colorlighten(int r, int g, int b, double percent)
lighten
int r2, g2, b2;
r2 = r + (int) ((255 - r) * percent);
g2 = g + (int) ((255 - g) * percent);
b2 = b + (int) ((255 - b) * percent);
return new Color(r2, g2, b2);
ColorlightenColor(Color col, float factor)
Lightens up a color for groove, ridge, inset and outset border effects.
float[] cols = new float[4];
cols = col.getRGBComponents(cols);
if (factor > 0) {
    cols[0] += (1.0 - cols[0]) * factor;
    cols[1] += (1.0 - cols[1]) * factor;
    cols[2] += (1.0 - cols[2]) * factor;
} else {
    cols[0] -= cols[0] * -factor;
...
ColorlightenColor(Color color)
Deschide o culoare, adunand la fiecare componenta offsetul standard
return lightenColor(color, OFFSET_COLOR);
Colorlighter(Color c)
lighter
if (c == null)
    return null;
else {
    int r = c.getRed();
    int g = c.getGreen();
    int b = c.getBlue();
    r += 64 * (255 - r) / 255;
    g += 64 * (255 - g) / 255;
...
Colorlighter(Color c)
Create a color derived from the given color, but lighter.
float[] hsb = Color.RGBtoHSB(c.getRed(), c.getGreen(), c.getBlue(), null);
hsb[1] = hsb[1] * 0.75f; 
hsb[2] = Math.min(hsb[2] * 1.1f, 1.0f); 
return new Color(Color.HSBtoRGB(hsb[0], hsb[1], hsb[2]));
Colorlighter(Color c, boolean transparant)
lighter
double org = 0.6;
double white = 0.4;
if (!transparant)
    return new Color((int) (c.getRed() * org + 0xff * white), (int) (c.getGreen() * org + 0xff * white),
            (int) (c.getBlue() * org + 0xff * white));
else
    return new Color((int) (c.getRed() * org + 0xff * white), (int) (c.getGreen() * org + 0xff * white),
            (int) (c.getBlue() * org + 0xff * white), (int) (0.8 * 0xff));
...
Colorlighter(Color c, float factor)
Returns a lighter version of the given color by the given factor.
return blend(c, Color.WHITE, factor);