Package com.github.weisj.darklaf.color
Class ColorUtil
java.lang.Object
com.github.weisj.darklaf.color.ColorUtil
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ColorblendColors(Color color1, Color color2, double percent)static booleanstatic Colorstatic Colorstatic doublegetLuminance(int red, int green, int blue)static doublegetLuminance(Color c)static doubleCalculate the perceived brightness of a color.static ColorremoveAlpha(Color color)static Colorstatic ColorstripUIResource(Color c, boolean canOverwrite)static Colorstatic Colorstatic String
-
Constructor Details
-
ColorUtil
public ColorUtil()
-
-
Method Details
-
blendColors
-
shift
-
toAlpha
-
toAlpha
-
fromHex
-
fromHex
-
toHex
-
canOverwriteColor
-
stripUIResource
-
removeAlpha
-
getPerceivedBrightness
Calculate the perceived brightness of a color.- Parameters:
c- the color.- Returns:
- the brightness from 0 to 255.
-
getLuminance
-
getLuminance
public static double getLuminance(int red, int green, int blue)
-