mirror of
https://github.com/RGBCube/color.v
synced 2025-07-31 09:57:47 +00:00
Reformat
This commit is contained in:
parent
8f6d2a7784
commit
6aa8a3fc47
2 changed files with 25 additions and 25 deletions
|
@ -56,7 +56,7 @@ fn (c TrueColor) render_bg(str string) string {
|
||||||
}
|
}
|
||||||
|
|
||||||
struct BasicColor {
|
struct BasicColor {
|
||||||
pub:
|
pub:
|
||||||
render fn (string) string
|
render fn (string) string
|
||||||
render_bg fn (string) string
|
render_bg fn (string) string
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,32 +5,32 @@ import term
|
||||||
pub const (
|
pub const (
|
||||||
// Styles
|
// Styles
|
||||||
reset = Style(StyleImpl.reset)
|
reset = Style(StyleImpl.reset)
|
||||||
bold = Style(StyleImpl.bold)
|
bold = Style(StyleImpl.bold)
|
||||||
dim = Style(StyleImpl.dim)
|
dim = Style(StyleImpl.dim)
|
||||||
italic = Style(StyleImpl.italic)
|
italic = Style(StyleImpl.italic)
|
||||||
underline = Style(StyleImpl.underline)
|
underline = Style(StyleImpl.underline)
|
||||||
slow_blink = Style(StyleImpl.slow_blink)
|
slow_blink = Style(StyleImpl.slow_blink)
|
||||||
rapid_blink = Style(StyleImpl.rapid_blink)
|
rapid_blink = Style(StyleImpl.rapid_blink)
|
||||||
inverse = Style(StyleImpl.inverse)
|
inverse = Style(StyleImpl.inverse)
|
||||||
hidden = Style(StyleImpl.hidden)
|
hidden = Style(StyleImpl.hidden)
|
||||||
strikethrough = Style(StyleImpl.strikethrough)
|
strikethrough = Style(StyleImpl.strikethrough)
|
||||||
// Colors
|
// Colors
|
||||||
black = Color(BasicColor{term.black, term.bg_black})
|
black = Color(BasicColor{term.black, term.bg_black})
|
||||||
bright_black = Color(BasicColor{term.bright_black, term.bright_bg_black})
|
bright_black = Color(BasicColor{term.bright_black, term.bright_bg_black})
|
||||||
red = Color(BasicColor{term.red, term.bg_red})
|
red = Color(BasicColor{term.red, term.bg_red})
|
||||||
bright_red = Color(BasicColor{term.bright_red, term.bright_bg_red})
|
bright_red = Color(BasicColor{term.bright_red, term.bright_bg_red})
|
||||||
green = Color(BasicColor{term.green, term.bg_green})
|
green = Color(BasicColor{term.green, term.bg_green})
|
||||||
bright_green = Color(BasicColor{term.bright_green, term.bright_bg_green})
|
bright_green = Color(BasicColor{term.bright_green, term.bright_bg_green})
|
||||||
yellow = Color(BasicColor{term.yellow, term.bg_yellow})
|
yellow = Color(BasicColor{term.yellow, term.bg_yellow})
|
||||||
bright_yellow = Color(BasicColor{term.bright_yellow, term.bright_bg_yellow})
|
bright_yellow = Color(BasicColor{term.bright_yellow, term.bright_bg_yellow})
|
||||||
blue = Color(BasicColor{term.blue, term.bg_blue})
|
blue = Color(BasicColor{term.blue, term.bg_blue})
|
||||||
bright_blue = Color(BasicColor{term.bright_blue, term.bright_bg_blue})
|
bright_blue = Color(BasicColor{term.bright_blue, term.bright_bg_blue})
|
||||||
magenta = Color(BasicColor{term.magenta, term.bg_magenta})
|
magenta = Color(BasicColor{term.magenta, term.bg_magenta})
|
||||||
bright_magenta = Color(BasicColor{term.bright_magenta, term.bright_bg_magenta})
|
bright_magenta = Color(BasicColor{term.bright_magenta, term.bright_bg_magenta})
|
||||||
cyan = Color(BasicColor{term.cyan, term.bg_cyan})
|
cyan = Color(BasicColor{term.cyan, term.bg_cyan})
|
||||||
bright_cyan = Color(BasicColor{term.bright_cyan, term.bright_bg_cyan})
|
bright_cyan = Color(BasicColor{term.bright_cyan, term.bright_bg_cyan})
|
||||||
white = Color(BasicColor{term.white, term.bg_white})
|
white = Color(BasicColor{term.white, term.bg_white})
|
||||||
bright_white = Color(BasicColor{term.bright_white, term.bright_bg_white})
|
bright_white = Color(BasicColor{term.bright_white, term.bright_bg_white})
|
||||||
)
|
)
|
||||||
|
|
||||||
const no_color = !term.can_show_color_on_stdout()
|
const no_color = !term.can_show_color_on_stdout()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue