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

Colorlighter(Color clr)
lighter
float[] hsb = new float[3];
Color.RGBtoHSB(clr.getRed(), clr.getGreen(), clr.getBlue(), hsb);
hsb[1] *= 0.4;
return Color.getHSBColor(hsb[0], hsb[1], hsb[2]);
Colorlighter(Color clr, double saturationFraction)
lighter
float[] hsb = new float[3];
Color.RGBtoHSB(clr.getRed(), clr.getGreen(), clr.getBlue(), hsb);
hsb[1] *= saturationFraction;
return Color.getHSBColor(hsb[0], hsb[1], hsb[2]);
Colorlighter(Color color, double fraction)
Make a color lighter.
int red = (int) Math.round(color.getRed() * (1.0 + fraction));
int green = (int) Math.round(color.getGreen() * (1.0 + fraction));
int blue = (int) Math.round(color.getBlue() * (1.0 + fraction));
return new Color(normalize(red), normalize(green), normalize(blue), color.getAlpha());
Colorlighter(Color color, float ratio)
Make a color lighter.
return mergeColors(Color.WHITE, ratio, color, 1 - ratio);
Colorlighter(final Color color, final int rgbOffset)
Returns a lighter version of the given color.
if (color == null)
    throw new IllegalArgumentException("Parameter 'color' must not be null!");
final int red = Math.min(color.getRed() + rgbOffset, 255);
final int green = Math.min(color.getGreen() + rgbOffset, 255);
final int blue = Math.min(color.getBlue() + rgbOffset, 255);
return new Color(red, green, blue, color.getAlpha());
Colorlighter(final Color color, float factor)
Create a lighter color using a factor.
return new Color(Math.max((int) (color.getRed() / factor), 0),
        Math.max((int) (color.getGreen() / factor), 0), Math.max((int) (color.getBlue() / factor), 0));
ColorlighterColor(Color c, double amount)
lighter Color
return darkerColor(c, -amount);
ColorlighterColor(Color lineColor, int adj)
lighter Color
int r = Math.max(0, Math.min(255, lineColor.getRed() + adj));
int g = Math.max(0, Math.min(255, lineColor.getGreen() + adj));
int b = Math.max(0, Math.min(255, lineColor.getBlue() + adj));
return new Color(r, g, b, lineColor.getAlpha());