Skip to content

Commit

Permalink
Add bg colors to basic to hex convertor
Browse files Browse the repository at this point in the history
  • Loading branch information
mehrdadep committed Aug 1, 2021
1 parent 4405889 commit ac28629
Showing 1 changed file with 32 additions and 16 deletions.
48 changes: 32 additions & 16 deletions convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,38 @@ var (
// ---------- basic(16) <=> RGB color convert ----------
// refer from Hyper app
basic2hexMap = map[uint8]string{
30: "000000", // black
31: "c51e14", // red
32: "1dc121", // green
33: "c7c329", // yellow
34: "0a2fc4", // blue
35: "c839c5", // magenta
36: "20c5c6", // cyan
37: "c7c7c7", // white
90: "686868", // lightBlack/darkGray
91: "fd6f6b", // lightRed
92: "67f86f", // lightGreen
93: "fffa72", // lightYellow
94: "6a76fb", // lightBlue
95: "fd7cfc", // lightMagenta
96: "68fdfe", // lightCyan
97: "ffffff", // lightWhite
30: "000000", // black
31: "c51e14", // red
32: "1dc121", // green
33: "c7c329", // yellow
34: "0a2fc4", // blue
35: "c839c5", // magenta
36: "20c5c6", // cyan
37: "c7c7c7", // white
40: "000000", // black
41: "c51e14", // red
42: "1dc121", // green
43: "c7c329", // yellow
44: "0a2fc4", // blue
45: "c839c5", // magenta
46: "20c5c6", // cyan
47: "c7c7c7", // white
90: "686868", // lightBlack/darkGray
91: "fd6f6b", // lightRed
92: "67f86f", // lightGreen
93: "fffa72", // lightYellow
94: "6a76fb", // lightBlue
95: "fd7cfc", // lightMagenta
96: "68fdfe", // lightCyan
97: "ffffff", // lightWhite
100: "686868", // lightBlack/darkGray
101: "fd6f6b", // lightRed
102: "67f86f", // lightGreen
103: "fffa72", // lightYellow
104: "6a76fb", // lightBlue
105: "fd7cfc", // lightMagenta
106: "68fdfe", // lightCyan
107: "ffffff", // lightWhite
}
// will convert data from basic2hexMap
hex2basicMap = initHex2basicMap()
Expand Down

0 comments on commit ac28629

Please sign in to comment.