Makes a color lighter or darker. Positive value makes this color lighter, negative value makes this color darker.
11911192119311941195119611971198119912001201
*/ public final void write(Icon icon) { Color color = border.color(); before(() -> { font.color(color.lighten(-20)).family(Icons); content.text(icon.code); text.verticalAlign.middle(); }); } }
6263646566676869707172
*/ public ColorList createListFromColor(ReadonlyTColor src) { ColorList colors = new ColorList(src); TColor c = src.getRotatedRYB(theta); if (c.brightness() < 0.5) { c.lighten(0.2f); } else { c.darken(0.2f); } colors.add(c);
7071727374757677787980
} colors.add(c); c = src.getRotatedRYB(theta * 2); if (c.brightness() < 0.5) { c.lighten(0.1f); } else { c.darken(0.1f); } colors.add(c);
6162636465666768697071
} colors.add(c); // A soft supporting color: lighter and less saturated. c = src.copy(); c.lighten(0.3f); c.setSaturation(0.1f + c.saturation() * 0.3f); colors.add(c); // A contrasting complement: very dark or very light. c = src.getComplement();
7879808182838485868788
// The complement and a light supporting variant. colors.add(src.getComplement()); c = src.getComplement(); c.lighten(0.3f); c.setSaturation(0.1f + c.saturation() * 0.25f); colors.add(c); return colors; }