类 ColorService

java.lang.Object
pkg.exoad.poprock.core.ColorService

@ServiceClass(requiresArming=false) public final class ColorService extends Object
Color Service - A utility class for providing basic operations on Colors. However, it is not used for more complicated color operations.
作者:
Jack Meng
另请参阅:
  • 构造器详细资料

    • ColorService

      private ColorService()
  • 方法详细资料

    • hexToColor

      public static Color hexToColor(String hex)
      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

      public static Color hexToColorAWT(String hex)
    • invertColor

      public static Color invertColor(Color r)
      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