Class ColorUtil


  • public final class ColorUtil
    extends Object
    Provides convenience methods for converting Java FX Color objects to integer representations in the format 0xAARRGGBB and vice versa.
    Since:
    100.0.0
    • Constructor Detail

      • ColorUtil

        public ColorUtil()
    • Method Detail

      • colorToArgb

        public static int colorToArgb​(Color color)
        Converts the specified Color object to an integer representation in the format 0xAARRGGBB.
        Parameters:
        color - the Color object to convert
        Returns:
        an integer representation of the Java FX Color object
        Throws:
        IllegalArgumentException - if color is null
        Since:
        100.0.0
      • argbToColor

        public static Color argbToColor​(int argb)
        Converts the specified integer color in the format 0xAARRGGBB to a Java FX Color object.
        Parameters:
        argb - the integer color to convert
        Returns:
        the Java FX Color object corresponding to the integer color
        Since:
        100.0.0