类 ColorService
java.lang.Object
pkg.exoad.poprock.core.ColorService
Color Service - A utility class for providing basic operations on Colors. However, it
is not used for more complicated color operations.
-
构造器概要
-
方法概要
修饰符和类型方法说明static Color
hexToColor
(String hex) AWT Function
This function converts from a HEX Color code #FFFFFF to a color object.static Color
hexToColorAWT
(String hex) static Color
invertColor
(Color r) AWT Function Takes a color object and inverts the color values.
-
构造器详细资料
-
ColorService
private ColorService()
-
-
方法详细资料
-
hexToColor
AWT Function
This function converts from a HEX Color code #FFFFFF to a color object.
The format must follow "#ffffff" with a hashtag at the start and 6 trailing hexadecimal characters.- 参数:
hex
- The provided hex.- 返回:
- The Color Object
-
hexToColorAWT
-
invertColor
AWT Function Takes a color object and inverts the color values. For example, the invert of WHITE would be BLACK.- 参数:
r
- The AWT Color Object to invert- 返回:
- The invertted AWT Color Object
-