CommandLine.Help.ColorScheme (picocli 3.9.6 API)
Date: 2019-04-06

picocli

## Class CommandLine.Help.ColorScheme

- java.lang.Object
- - picocli.CommandLine.Help.ColorScheme

- Enclosing class:
    CommandLine.Help

      public static class CommandLine.Help.ColorScheme
      extends java.lang.Object

  All usage help message are generated with a color scheme that assigns certain styles and colors to common parts of a usage message: the command name, options, positional parameters and option parameters. Users may customize these styles by creating Help with a custom color scheme.

  Note that these options and styles may not be rendered if ANSI escape codes are not enabled.

  See Also:
    `CommandLine.Help.defaultColorScheme(Ansi)`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `java.util.List<CommandLine.Help.Ansi.IStyle>` | `commandStyles`
    `java.util.List<CommandLine.Help.Ansi.IStyle>` | `optionParamStyles`
    `java.util.List<CommandLine.Help.Ansi.IStyle>` | `optionStyles`
    `java.util.List<CommandLine.Help.Ansi.IStyle>` | `parameterStyles`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ColorScheme()` Constructs a new empty ColorScheme with `CommandLine.Help.Ansi.AUTO`.
    `ColorScheme(CommandLine.Help.Ansi ansi)` Constructs a new empty ColorScheme with the specified Ansi enabled mode.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `CommandLine.Help.Ansi` | `ansi()`
    `CommandLine.Help.ColorScheme` | `applySystemProperties()` Replaces colors and styles in this scheme with ones specified in system properties, and returns this scheme.
    `CommandLine.Help.ColorScheme` | `commands(CommandLine.Help.Ansi.IStyle... styles)` Adds the specified styles to the registered styles for commands in this color scheme and returns this color scheme.
    `CommandLine.Help.Ansi.Text` | `commandText(java.lang.String command)` Returns a Text with all command styles applied to the specified command string.
    `CommandLine.Help.ColorScheme` | `optionParams(CommandLine.Help.Ansi.IStyle... styles)` Adds the specified styles to the registered styles for option parameters in this color scheme and returns this color scheme.
    `CommandLine.Help.Ansi.Text` | `optionParamText(java.lang.String optionParam)` Returns a Text with all optionParam styles applied to the specified optionParam string.
    `CommandLine.Help.ColorScheme` | `options(CommandLine.Help.Ansi.IStyle... styles)` Adds the specified styles to the registered styles for options in this color scheme and returns this color scheme.
    `CommandLine.Help.Ansi.Text` | `optionText(java.lang.String option)` Returns a Text with all option styles applied to the specified option string.
    `CommandLine.Help.ColorScheme` | `parameters(CommandLine.Help.Ansi.IStyle... styles)` Adds the specified styles to the registered styles for positional parameters in this color scheme and returns this color scheme.
    `CommandLine.Help.Ansi.Text` | `parameterText(java.lang.String parameter)` Returns a Text with all parameter styles applied to the specified parameter string.

    - ### Methods inherited from class java.lang.Object

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

- - ### Field Detail

    - #### commandStyles

          public final java.util.List<CommandLine.Help.Ansi.IStyle> commandStyles

    - #### optionStyles

          public final java.util.List<CommandLine.Help.Ansi.IStyle> optionStyles

    - #### parameterStyles

          public final java.util.List<CommandLine.Help.Ansi.IStyle> parameterStyles

    - #### optionParamStyles

          public final java.util.List<CommandLine.Help.Ansi.IStyle> optionParamStyles

  - ### Constructor Detail

    - #### ColorScheme

          public ColorScheme()

      Constructs a new empty ColorScheme with `CommandLine.Help.Ansi.AUTO`.

    - #### ColorScheme

          public ColorScheme(CommandLine.Help.Ansi ansi)

      Constructs a new empty ColorScheme with the specified Ansi enabled mode.
      Parameters:
        `ansi` - whether to emit ANSI escape codes or not
      See Also:
        `CommandLine.Help.defaultColorScheme(Ansi)`

  - ### Method Detail

    - #### commands

          public CommandLine.Help.ColorScheme commands(CommandLine.Help.Ansi.IStyle... styles)

      Adds the specified styles to the registered styles for commands in this color scheme and returns this color scheme.
      Parameters:
        `styles` - the styles to add to the registered styles for commands in this color scheme
      Returns:
        this color scheme to enable method chaining for a more fluent API

    - #### options

          public CommandLine.Help.ColorScheme options(CommandLine.Help.Ansi.IStyle... styles)

      Adds the specified styles to the registered styles for options in this color scheme and returns this color scheme.
      Parameters:
        `styles` - the styles to add to registered the styles for options in this color scheme
      Returns:
        this color scheme to enable method chaining for a more fluent API

    - #### parameters

          public CommandLine.Help.ColorScheme parameters(CommandLine.Help.Ansi.IStyle... styles)

      Adds the specified styles to the registered styles for positional parameters in this color scheme and returns this color scheme.
      Parameters:
        `styles` - the styles to add to registered the styles for parameters in this color scheme
      Returns:
        this color scheme to enable method chaining for a more fluent API

    - #### optionParams

          public CommandLine.Help.ColorScheme optionParams(CommandLine.Help.Ansi.IStyle... styles)

      Adds the specified styles to the registered styles for option parameters in this color scheme and returns this color scheme.
      Parameters:
        `styles` - the styles to add to the registered styles for option parameters in this color scheme
      Returns:
        this color scheme to enable method chaining for a more fluent API

    - #### commandText

          public CommandLine.Help.Ansi.Text commandText(java.lang.String command)

      Returns a Text with all command styles applied to the specified command string.
      Parameters:
        `command` - the command string to apply the registered command styles to
      Returns:
        a Text with all command styles applied to the specified command string

    - #### optionText

          public CommandLine.Help.Ansi.Text optionText(java.lang.String option)

      Returns a Text with all option styles applied to the specified option string.
      Parameters:
        `option` - the option string to apply the registered option styles to
      Returns:
        a Text with all option styles applied to the specified option string

    - #### parameterText

          public CommandLine.Help.Ansi.Text parameterText(java.lang.String parameter)

      Returns a Text with all parameter styles applied to the specified parameter string.
      Parameters:
        `parameter` - the parameter string to apply the registered parameter styles to
      Returns:
        a Text with all parameter styles applied to the specified parameter string

    - #### optionParamText

          public CommandLine.Help.Ansi.Text optionParamText(java.lang.String optionParam)

      Returns a Text with all optionParam styles applied to the specified optionParam string.
      Parameters:
        `optionParam` - the option parameter string to apply the registered option parameter styles to
      Returns:
        a Text with all option parameter styles applied to the specified option parameter string

    - #### applySystemProperties

          public CommandLine.Help.ColorScheme applySystemProperties()

      Replaces colors and styles in this scheme with ones specified in system properties, and returns this scheme. Supported property names:
      - `picocli.color.commands`
      - `picocli.color.options`
      - `picocli.color.parameters`
      - `picocli.color.optionParams`

      Property values can be anything that `CommandLine.Help.Ansi.Style.parse(String)` can handle.

      Returns:
        this ColorScheme

    - #### ansi

          public CommandLine.Help.Ansi ansi()