Package guideme.color

Class Colors

java.lang.Object
guideme.color.Colors

public final class Colors extends Object
  • Constructor Details

    • Colors

      public Colors()
  • Method Details

    • hexToRgb

      public static int hexToRgb(String hexColor)
      Converts a hexadecimal color string to a packed RGB or ARGB integer. If no alpha is given, assumes alpha 255. The order of colors in the hex string follows CSS notations (#RRGGBBAA or #RGBA).
      Parameters:
      hexColor - The color string in hex format (with or without #)
      Returns:
      The packed RGB value as an integer
      Throws:
      IllegalArgumentException - if the input format is invalid
    • argb

      public static int argb(int a, int r, int g, int b)
    • rgb

      public static int rgb(int r, int g, int b)
    • mono

      public static int mono(int w)