Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

lua-color

A simple terminal styling library for Lua

local c = require("color")

print(c.green .. "Green text" .. c.reset)

print(c.bright_cyan .. "Bright cyan text" .. c.reset)

print(c.bg_red .. "Red background" .. c.reset)

print(c.bright_blue_bg .. "Bright blue background" .. c.reset)

print(c.italic .. c.red .. "Italic red text" .. c.reset)

print(c.underline .. "Underlined text" .. c.reset)

print(c.bold .. "Bold text" .. c.reset)

print(c.rgb(66, 135, 245) .. "RGB text" .. c.reset)

print(c.bg_rgb(212, 19, 208) .. "RGB background" .. c.reset)

print(c.hex("#eb3496") .. "HEX color" .. module.reset)

print(c.bg_hex("#77eb34") .. "HEX background" .. module.reset)

Foreground Colors

  • black
  • red
  • green
  • yellow
  • blue
  • magenta
  • cyan
  • white

Background Colors

  • bg_black
  • bg_red
  • bg_green
  • bg_yellow
  • bg_blue
  • bg_magenta
  • bg_cyan
  • bg_white

Bright Background Colors

  • bright_black_bg
  • bright_red_bg
  • bright_green_bg
  • bright_yellow_bg
  • bright_blue_bg
  • bright_magenta_bg
  • bright_cyan_bg
  • bright_white_bg

Text Styles

  • bold
  • dim
  • italic
  • underline
  • inverse
  • strikethrough

True Color (24-bit RGB)

c.rgb(r, g, b) -- Foreground color
c.bg_rgb(r, g, b) -- Background color

HEX Color

c.hex(hex) -- Foreground color
c.bg_rgb(hex) -- Background color

MIT License

About

A simple terminal styling library for Lua

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages