Package 

Object Color.Companion

    • Method Summary

      Modifier and Type Method Description
      final Color fromHex(String hex) Creates a new RGB colour from the hex string providedThis can optionally be prefixed with the character '#'
      final Color fromRGB(RGB rgb) Creates a new RGB colour from the rgb value provided by converting the rgb value to an integer
      final Color fromRGB(Integer red, Integer green, Integer blue) Creates a new RGB colour from the red, green and blue values provided by converting them to a single RGB integer
      final Color fromRGB(Float red, Float green, Float blue) Creates a new RGB colour from the red, green and blue values provided by converting them to RGB integers, then converting those integers to a single RGB integer
      final Color fromInt(Integer value) Attempts to get a NamedColor with the specified RGB value, or else creates a new RGB colour from the value provided
      final Color random(Random random) Randomly generates an RGB colour from the given random generator (defaults to Random.Default)
      • Methods inherited from class me.bardy.komponent.colour.Color.Companion

        equals, hashCode, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • fromHex

         final Color fromHex(String hex)

        Creates a new RGB colour from the hex string provided

        This can optionally be prefixed with the character '#'

      • fromRGB

         final Color fromRGB(RGB rgb)

        Creates a new RGB colour from the rgb value provided by converting the rgb value to an integer

      • fromRGB

         final Color fromRGB(Integer red, Integer green, Integer blue)

        Creates a new RGB colour from the red, green and blue values provided by converting them to a single RGB integer

      • fromRGB

         final Color fromRGB(Float red, Float green, Float blue)

        Creates a new RGB colour from the red, green and blue values provided by converting them to RGB integers, then converting those integers to a single RGB integer

      • fromInt

         final Color fromInt(Integer value)

        Attempts to get a NamedColor with the specified RGB value, or else creates a new RGB colour from the value provided