Interface Palette

  • public interface Palette
    This interface provides a consistent way for various providers (ColorBrewer, ColourLovers, etc.) to provide color palettes to Cytoscape routines.
    • Method Detail

      • getName

        String getName()
        Return the name of this palette. This is intended to be the user-visible name, not the internal identifier.
        user-visible name of this palette
      • getIdentifier

        Object getIdentifier()
        Return the internal identifier of this palette. This is the internal identifier of the palette which might be different for different providers. For example, BrewerPalettes use short names (e.g. RdBu), while ColourLovers uses an integer.
        the internal identifier for this palette
      • getType

        PaletteType getType()
        This is the type of the palette, using the Cynthia Brewer's classification.
        the palette type
      • size

        int size()
        Return the number of colors natively in the palette.
        the number of colors in the palette
      • getColors

        Color[] getColors()
        Return the palette as an array of colors
        the color array
      • getColors

        Color[] getColors​(int nColors)
        Return the palette as an array of colors of the requested length. If the number of colors in the palette is less than the requested number, the colors will be interpolated.
        the color array
      • isColorBlindSafe

        boolean isColorBlindSafe()
        Return true if the palette is color blind safe.
        true if the palette is color blind safe
      • toString

        String toString()
        Return the string representation of this palette (usually the name)
        toString in class Object
        the palette name
      • getPaletteProvider

        default PaletteProvider getPaletteProvider()
        Return the PaletteProvider for this palette. Note that by default, this returns null so as not to break existing palette implementations.
        the PaletteProvider for this palette