Similar in spirit to Chalk. Each method
returns a new Ink instance, leaving the original unchanged. Call on(String)
to produce the final styled string.
Outputs raw ANSI escape sequences directly — no markup parser involved.
Usage:
Clique.ink().red().bold().on("Error")
Clique.ink().of("ctp_mauve").bold().on("Hello")
| Modifier and Type | Field and Description |
|---|---|
| private final List | |
| private final StyleContext | |
| private final Gradient | |
| private final Hyperlink |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| pack-priv | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public Ink | |
| public Ink | |
| public Ink | |
| public Ink | |
| public Ink | |
| public Ink | |
| public Ink | |
| public Ink | |
| public Ink | |
| public Ink | |
| public Ink | |
| public Ink | |
| public Ink | |
| public Ink | |
| public Ink | |
| public Ink | |
| public Ink | |
| public Ink | |
| public Ink | |
| public Ink | |
| public Ink | |
| public Ink | |
| public Ink | |
| public Ink | |
| public Ink | |
| public Ink | |
| public Ink | |
| public Ink | |
| public Ink | |
| public Ink | |
| public Ink | |
| public Ink | |
| public boolean | equals(Object o)
Overrides java. Indicates whether some other object is "equal to" this one. |
| public Ink | Returns: a newInk instance with the gradient accumulatedthe starting from, RGBAnsiCode RGBAnsiCode of the gradient; must not be nullthe ending to)RGBAnsiCode of the gradient; must not be nullApplies a color gradient to this |
| public Ink | Returns: a newInk instance with the gradient accumulatedthe starting hexCode of the gradient; must not be fromHex, String nullthe ending hexCode of the gradient; must not be toHex)nullApplies a color gradient to this |
| public Ink | |
| public int | |
| public Ink | |
| public Ink | |
| public Ink | |
| public Ink | |
| public Ink | |
| public Ink | Returns: a newInk instance with the style accumulatedthe registered style name (e.g. style)"ctp_mauve")Adds a named style, looked up from the instance's |
| public Ink | Returns: a newInk instance with the style accumulatedthe AnsiCode to be applied code)Adds a named style, looked up from the instance's |
| public String | |
| public String | |
| public Ink | |
| public Ink | |
| public Ink | |
| public Ink | |
| public String | |
| public Ink | |
| public Ink | |
| private Ink | |
| private Ink | |
| private Ink | |
| public Ink |
| codes | back to summary |
|---|---|
| private final List<AnsiCode> codes | |
| context | back to summary |
|---|---|
| private final StyleContext context | |
| gradient | back to summary |
|---|---|
| private final Gradient gradient | |
| hyperlink | back to summary |
|---|---|
| private final Hyperlink hyperlink | |
| Ink | back to summary |
|---|---|
| public Ink() | |
| Ink | back to summary |
|---|---|
| public Ink(StyleContext context) | |
| Ink | back to summary |
|---|---|
| pack-priv Ink(List<AnsiCode> codes, StyleContext context) | |
| Ink | back to summary |
|---|---|
| pack-priv Ink(List<AnsiCode> codes, StyleContext context, Hyperlink hyperLink, Gradient gradient) | |
| bgBlack | back to summary |
|---|---|
| public Ink bgBlack() | |
| bgBlue | back to summary |
|---|---|
| public Ink bgBlue() | |
| bgCyan | back to summary |
|---|---|
| public Ink bgCyan() | |
| bgGreen | back to summary |
|---|---|
| public Ink bgGreen() | |
| bgHex | back to summary |
|---|---|
| public Ink bgHex(String hexCode) Applies a background hex color to this The hex string must be in
| |
| bgMagenta | back to summary |
|---|---|
| public Ink bgMagenta() | |
| bgRed | back to summary |
|---|---|
| public Ink bgRed() | |
| bgRgb | back to summary |
|---|---|
| public Ink bgRgb(int red, int green, int blue) | |
| bgWhite | back to summary |
|---|---|
| public Ink bgWhite() | |
| bgYellow | back to summary |
|---|---|
| public Ink bgYellow() | |
| black | back to summary |
|---|---|
| public Ink black() | |
| blue | back to summary |
|---|---|
| public Ink blue() | |
| bold | back to summary |
|---|---|
| public Ink bold() | |
| brightBgBlack | back to summary |
|---|---|
| public Ink brightBgBlack() | |
| brightBgBlue | back to summary |
|---|---|
| public Ink brightBgBlue() | |
| brightBgCyan | back to summary |
|---|---|
| public Ink brightBgCyan() | |
| brightBgGreen | back to summary |
|---|---|
| public Ink brightBgGreen() | |
| brightBgMagenta | back to summary |
|---|---|
| public Ink brightBgMagenta() | |
| brightBgRed | back to summary |
|---|---|
| public Ink brightBgRed() | |
| brightBgWhite | back to summary |
|---|---|
| public Ink brightBgWhite() | |
| brightBgYellow | back to summary |
|---|---|
| public Ink brightBgYellow() | |
| brightBlack | back to summary |
|---|---|
| public Ink brightBlack() | |
| brightBlue | back to summary |
|---|---|
| public Ink brightBlue() | |
| brightCyan | back to summary |
|---|---|
| public Ink brightCyan() | |
| brightGreen | back to summary |
|---|---|
| public Ink brightGreen() | |
| brightMagenta | back to summary |
|---|---|
| public Ink brightMagenta() | |
| brightRed | back to summary |
|---|---|
| public Ink brightRed() | |
| brightWhite | back to summary |
|---|---|
| public Ink brightWhite() | |
| brightYellow | back to summary |
|---|---|
| public Ink brightYellow() | |
| cyan | back to summary |
|---|---|
| public Ink cyan() | |
| dim | back to summary |
|---|---|
| public Ink dim() | |
| doubleUnderline | back to summary |
|---|---|
| public Ink doubleUnderline() | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.
| |
| gradient | back to summary |
|---|---|
| public Ink gradient(RGBAnsiCode from, RGBAnsiCode to) Applies a color gradient to this The gradient is computed by linearly interpolating the R, G, and B
channels between
| |
| gradient | back to summary |
|---|---|
| public Ink gradient(String fromHex, String toHex) Applies a color gradient to this The gradient is computed by linearly interpolating the R, G, and B
channels between
| |
| green | back to summary |
|---|---|
| public Ink green() | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| hex | back to summary |
|---|---|
| public Ink hex(String hexCode) Applies a foreground hex color to this The hex string must be in
| |
| hyperlink | back to summary |
|---|---|
| public Ink hyperlink(String url) Applies a hyperlink to this
| |
| invisible | back to summary |
|---|---|
| public Ink invisible() | |
| italic | back to summary |
|---|---|
| public Ink italic() | |
| magenta | back to summary |
|---|---|
| public Ink magenta() | |
| of | back to summary |
|---|---|
| public Ink of(String style) Adds a named style, looked up from the instance's
| |
| of | back to summary |
|---|---|
| public Ink of(AnsiCode code) Adds a named style, looked up from the instance's
| |
| on | back to summary |
|---|---|
| public String on(String value) Applies the accumulated ANSI codes to the given value and returns the styled string. Appends a reset sequence at the end.
| |
| on | back to summary |
|---|---|
| public String on(Object value) Applies the accumulated ANSI codes to the given value and returns the styled string. Appends a reset sequence at the end.
| |
| red | back to summary |
|---|---|
| public Ink red() | |
| reverseVideo | back to summary |
|---|---|
| public Ink reverseVideo() | |
| rgb | back to summary |
|---|---|
| public Ink rgb(int red, int green, int blue) | |
| strikethrough | back to summary |
|---|---|
| public Ink strikethrough() | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| underline | back to summary |
|---|---|
| public Ink underline() | |
| white | back to summary |
|---|---|
| public Ink white() | |
| with | back to summary |
|---|---|
| private Ink with(AnsiCode code) | |
| with | back to summary |
|---|---|
| private Ink with(Hyperlink hyperlink) | |
| with | back to summary |
|---|---|
| private Ink with(Gradient gradient) | |
| yellow | back to summary |
|---|---|
| public Ink yellow() | |