Module logicng

Class GraphicalColor


  • public class GraphicalColor
    extends Object
    A color for graphical representations of formulas, BDDs, and graphs.

    A color can be generated from RGB or hex values.

    Since:
    2.4.0
    Version:
    2.4.0
    • Method Detail

      • hex

        public static GraphicalColor hex​(String hexValue)
        Constructs a new color from a hex value. The string must be of the form "#aabbcc". E.g. the default red has the representation "#ea2027".
        Parameters:
        hexValue - the hex value
        Returns:
        the color object
      • rgb

        public static GraphicalColor rgb​(int red,
                                         int green,
                                         int blue)
        Constructs a new color from an RGB value. Each value must be within range 0 (inclusive) and 255 (inclusive).
        Parameters:
        red - the red value
        green - the green value
        blue - the blue value
        Returns:
        the color object
      • getHexValue

        public String getHexValue()
        Returns the hex value of this color.
        Returns:
        the hex value of this color
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object