paginator and styles

This commit is contained in:
2024-09-24 20:42:44 +02:00
parent 3529f3dcc5
commit 905a77f8b0
8 changed files with 263 additions and 45 deletions
+36
View File
@@ -0,0 +1,36 @@
package styles
import "fmt"
const (
Reset = "\033[0m"
Bold = "\033[1m"
Underline = "\033[4m"
Italic = "\033[3m"
Reverse = "\033[7m"
Strike = "\033[9m"
// Font Colors
Black = "\033[30m"
Red = "\033[31m"
Green = "\033[32m"
Yellow = "\033[33m"
Blue = "\033[34m"
Magenta = "\033[35m"
Cyan = "\033[36m"
White = "\033[37m"
// Background Colors
BgBlack = "\033[40m"
BgRed = "\033[41m"
BgGreen = "\033[42m"
BgYellow = "\033[43m"
BgBlue = "\033[44m"
BgMagenta = "\033[45m"
BgCyan = "\033[46m"
BgWhite = "\033[47m"
)
func Rgb(r, g, b uint8) string {
return fmt.Sprintf("\x1b[38;2;%d;%d;%dm", r, g, b)
}