Package 

Interface Color


  • 
    public interface Color
    
                        

    Represents an RGB colour. Stored as a single RGB integer, where the bits 16-23 represent the red value, 8-15 represent the green value and 0-7 represent the blue value

    Usage:

    all these methods create an RGB colour with the RGB value 16777215

    Color.fromHex("#ffffff") (# prefix is optional)
    Color.fromRGB(16777215)
    Color.fromRGB(255, 255, 255)
    Color.fromRGB(1.0f, 1.0f, 1.0f)

    this method attempts to convert the value to a NamedColor, or else returns an RGBColor

    Color.fromInt(16777215)
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public class Color.Companion
    • Method Summary

      Modifier and Type Method Description
      abstract Integer getValue()
      • Methods inherited from class me.bardy.komponent.colour.Color

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

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait