Enum Class JenkinsPalette

java.lang.Object
java.lang.Enum<JenkinsPalette>
io.jenkins.plugins.echarts.JenkinsPalette
All Implemented Interfaces:
Serializable, Comparable<JenkinsPalette>, Constable

public enum JenkinsPalette extends Enum<JenkinsPalette>
Jenkins color palette. Each color is represented as a CSS variable that will be rendered according to the selected theme.
Author:
Ullrich Hafner
See Also:
  • "JS method resolveJenkinsColors in file echarts-scope.js"
  • Jenkins colors
  • Enum Constant Details

  • Method Details

    • values

      public static JenkinsPalette[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static JenkinsPalette valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • chartColor

      public static JenkinsPalette chartColor(int n)
      Returns a chart color that can be used to render element n in a chart. If n is greater than the number of available colors then the color will be selected from the beginning of the list, and so on.
      Parameters:
      n - the n-th element to render
      Returns:
      a color to be used for rendering the n-th element
    • light

      public String light()
      Returns the CSS variable name for this color (light variation).
      Returns:
      the CSS variable name
    • normal

      public String normal()
      Returns the CSS variable name for this color.
      Returns:
      the CSS variable name
    • dark

      public String dark()
      Returns the CSS variable name for this color (dark variation).
      Returns:
      the CSS variable name