Lipgloss
Constants
Non-breaking space rune.
NoTabConversion can be passed to TabWidth to disable tab replacement
Tab width default
Underline style constants (re-exported from Ansi::Style)
Class methods
ASCIIBorder returns a table border with ASCII characters.
BlockBorder returns a border that takes the whole block.
Complete returns a function that will return the appropriate color based on the given color profile.
Example usage: p = Colorprofile.detect(io, ENV.to_a) complete = Lipgloss.complete(p) color = complete.call( Lipgloss.color("1"), # ANSI Lipgloss.color("124"), # ANSI256 Lipgloss.color("#ff34ac") # TrueColor )
DoubleBorder returns a border comprised of two thin strokes.
EnableLegacyWindowsANSI enables support for ANSI color sequences in the Windows default console (cmd.exe and the PowerShell application). Note that this only works with Windows 10 and greater. Also note that Windows Terminal supports colors by default.
This is a no-op on non-Windows platforms.
Global setting for adaptive colors
Global setting for adaptive colors
InnerHalfBlockBorder returns a half-block border that sits inside the frame.
LightDark returns a function that selects between a light and dark color based
on the given boolean. If is_dark is true, the returned function will pick
the dark color; otherwise it will pick the light color.
MarkdownBorder returns a table border in markdown style. Make sure to disable top and bottom border for the best result. This will ensure that the output is valid markdown.
Create a new style range (factory method matching Go lipgloss)
Create a new style (convenience)
NormalBorder returns a standard-type border with a normal weight and 90 degree corners.
OuterHalfBlockBorder returns a half-block border that sits outside the frame.
RoundedBorder returns a border with rounded corners.
Apply styling to ranges in a string (variadic version matching Go lipgloss)
Apply styles to specific rune (grapheme) indices.
ThickBorder returns a border that's thicker than the one returned by NormalBorder.
Wrap wraps the given string to the given width, preserving ANSI styles and links.
Nested types
- Lipgloss::ANSIColor
- Lipgloss::AdaptiveColor
- Lipgloss::Border
- Lipgloss::Canvas
- Lipgloss::Color
- Lipgloss::ColorProfile
- Lipgloss::Compat
- Lipgloss::CompleteAdaptiveColor
- Lipgloss::CompleteColor
- Lipgloss::CompleteFunc
- Lipgloss::Compositor
- Lipgloss::Edges
- Lipgloss::Layer
- Lipgloss::LayerHit
- Lipgloss::LightDarkColor
- Lipgloss::LightDarkFunc
- Lipgloss::List
- Lipgloss::NoColor
- Lipgloss::Point
- Lipgloss::Position
- Lipgloss::RGBAColor
- Lipgloss::RGBColor
- Lipgloss::Range
- Lipgloss::Rectangle
- Lipgloss::Renderer
- Lipgloss::Style
- Lipgloss::StyleRenderer
- Lipgloss::StyleTable
- Lipgloss::Text
- Lipgloss::Tree
- Lipgloss::Underline
- Lipgloss::UnderlineStyle
- Lipgloss::View
- Lipgloss::Whitespace
- Lipgloss::WhitespaceOption
- Lipgloss::WrapWriter