Class PaletteScheme

  • All Implemented Interfaces:
    Serializable, OptionDataListener, org.zkoss.json.JSONAware

    public class PaletteScheme
    extends Optionable
    The palette options for one color scheme, light or dark mode. See Palette.getLight() and Palette.getDark().

    The background, neutral and highlight colors are blended into CSS variables. For example, var(--highcharts-neutral-color-60) is 60% of the neutral color and 40% of the background color. The palette only accepts plain colors, not gradients or patterns.

    All the options in this class support DynamicalAttribute.

    Since:
    13.1.1.0
    Author:
    peggypeng
    See Also:
    Serialized Form
    • Constructor Detail

      • PaletteScheme

        public PaletteScheme()
    • Method Detail

      • getBackgroundColor

        public Color getBackgroundColor()
        Returns the chart background color, also used for the point stroke of markers and columns, and as the base of the blended neutral and highlight colors.

        Default: null

      • setBackgroundColor

        public void setBackgroundColor​(Color color)
        Sets the chart background color, also used for the point stroke of markers and columns, and as the base of the blended neutral and highlight colors. Defaults to "#ffffff" in light mode and "#141414" in dark mode.
      • setBackgroundColor

        public void setBackgroundColor​(String color)
        Sets the chart background color, also used for the point stroke of markers and columns, and as the base of the blended neutral and highlight colors. Defaults to "#ffffff" in light mode and "#141414" in dark mode.
      • getColors

        public List<Color> getColors()
        Returns the colors for data series and points in this mode.

        Default: null

      • setColors

        public void setColors​(List<Color> colors)
        Sets the colors for data series and points in this mode. They replace the colors of Palette.getColors() item by item; a null item keeps the general color.
      • setColors

        public void setColors​(String... source)
        Sets the colors for data series and points in this mode. They replace the colors of Palette.getColors() item by item; a null item keeps the general color.
      • getHighlightColor

        public Color getHighlightColor()
        Returns the highlight color, the base of the blended highlight colors used for highlighted or active elements, like the zoom selection marker and clickable drilldown labels.

        Default: null

      • setHighlightColor

        public void setHighlightColor​(Color color)
        Sets the highlight color, the base of the blended highlight colors used for highlighted or active elements, like the zoom selection marker and clickable drilldown labels. Defaults to "#0022ff" in light mode and "#2caffe" in dark mode.
      • setHighlightColor

        public void setHighlightColor​(String color)
        Sets the highlight color, the base of the blended highlight colors used for highlighted or active elements, like the zoom selection marker and clickable drilldown labels. Defaults to "#0022ff" in light mode and "#2caffe" in dark mode.
      • getNegativeColor

        public Color getNegativeColor()
        Returns the negative color used in stock charts, such as for technical indicators, annotations or hollow candlestick series.

        Default: null

      • setNegativeColor

        public void setNegativeColor​(Color color)
        Sets the negative color used in stock charts, such as for technical indicators, annotations or hollow candlestick series. Defaults to "#f21313"; dark mode uses the light mode color unless set.
      • setNegativeColor

        public void setNegativeColor​(String color)
        Sets the negative color used in stock charts, such as for technical indicators, annotations or hollow candlestick series. Defaults to "#f21313"; dark mode uses the light mode color unless set.
      • getNeutralColor

        public Color getNeutralColor()
        Returns the neutral color, the base of the blended neutral colors used for text, lines, borders and most other elements except the data.

        Default: null

      • setNeutralColor

        public void setNeutralColor​(Color color)
        Sets the neutral color, the base of the blended neutral colors used for text, lines, borders and most other elements except the data. Defaults to "#000000" in light mode and "#ffffff" in dark mode.
      • setNeutralColor

        public void setNeutralColor​(String color)
        Sets the neutral color, the base of the blended neutral colors used for text, lines, borders and most other elements except the data. Defaults to "#000000" in light mode and "#ffffff" in dark mode.
      • getPositiveColor

        public Color getPositiveColor()
        Returns the positive color used in stock charts, such as for technical indicators, annotations or hollow candlestick series.

        Default: null

      • setPositiveColor

        public void setPositiveColor​(Color color)
        Sets the positive color used in stock charts, such as for technical indicators, annotations or hollow candlestick series. Defaults to "#06b535"; dark mode uses the light mode color unless set.
      • setPositiveColor

        public void setPositiveColor​(String color)
        Sets the positive color used in stock charts, such as for technical indicators, annotations or hollow candlestick series. Defaults to "#06b535"; dark mode uses the light mode color unless set.