mirror of
https://github.com/KevinMidboe/motdGOi.git
synced 2025-10-29 17:50:24 +00:00
few fixes
This commit is contained in:
22
color.go
22
color.go
@@ -24,15 +24,15 @@ var (
|
|||||||
// TrueColor lookalikes for displaying AnsiColor f.e. with the HTML parser
|
// TrueColor lookalikes for displaying AnsiColor f.e. with the HTML parser
|
||||||
// Colors based on http://clrs.cc/
|
// Colors based on http://clrs.cc/
|
||||||
// "TrueColorForAnsiColor"
|
// "TrueColorForAnsiColor"
|
||||||
var tcfac map[AnsiColor]TrueColor = map[AnsiColor]TrueColor{
|
var tcfac map[*AnsiColor]TrueColor = map[*AnsiColor]TrueColor{
|
||||||
ColorBlack: {0, 0, 0},
|
&ColorBlack: {0, 0, 0},
|
||||||
ColorRed: {255, 65, 54},
|
&ColorRed: {255, 65, 54},
|
||||||
ColorGreen: {149, 189, 64},
|
&ColorGreen: {149, 189, 64},
|
||||||
ColorYellow: {255, 220, 0},
|
&ColorYellow: {255, 220, 0},
|
||||||
ColorBlue: {0, 116, 217},
|
&ColorBlue: {0, 116, 217},
|
||||||
ColorMagenta: {177, 13, 201},
|
&ColorMagenta: {177, 13, 201},
|
||||||
ColorCyan: {105, 206, 245},
|
&ColorCyan: {105, 206, 245},
|
||||||
ColorWhite: {255, 255, 255},
|
&ColorWhite: {255, 255, 255},
|
||||||
}
|
}
|
||||||
|
|
||||||
// Color has a pre- and a suffix
|
// Color has a pre- and a suffix
|
||||||
@@ -104,7 +104,7 @@ func (ac AnsiColor) getPrefix(p Parser) string {
|
|||||||
|
|
||||||
case "html":
|
case "html":
|
||||||
// Get the TrueColor for the AnsiColor
|
// Get the TrueColor for the AnsiColor
|
||||||
tc := tcfac[ac]
|
tc := tcfac[&ac]
|
||||||
return tc.getPrefix(p)
|
return tc.getPrefix(p)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -121,7 +121,7 @@ func (ac AnsiColor) getSuffix(p Parser) string {
|
|||||||
|
|
||||||
case "html":
|
case "html":
|
||||||
// Get the TrueColor for the AnsiColor
|
// Get the TrueColor for the AnsiColor
|
||||||
tc := tcfac[ac]
|
tc := tcfac[&ac]
|
||||||
return tc.getSuffix(p)
|
return tc.getSuffix(p)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user