MCPcopy Create free account
hub / github.com/ZeppelinMC/Zeppelin / charColor

Function charColor

protocol/text/text.go:123–158  ·  view source on GitHub ↗
(char rune)

Source from the content-addressed store, hash-verified

121}
122
123func charColor(char rune) string {
124 switch char {
125 case '0':
126 return "black"
127 case '1':
128 return "dark_blue"
129 case '2':
130 return "dark_green"
131 case '3':
132 return "dark_aqua"
133 case '4':
134 return "dark_red"
135 case '5':
136 return "dark_purple"
137 case '6':
138 return "gold"
139 case '7':
140 return "gray"
141 case '8':
142 return "dark_gray"
143 case '9':
144 return "blue"
145 case 'a':
146 return "green"
147 case 'b':
148 return "aqua"
149 case 'c':
150 return "red"
151 case 'd':
152 return "light_purple"
153 case 'e':
154 return "yellow"
155 default: // case 'f'
156 return "white"
157 }
158}
159
160func colorChar(color string, char string) string {
161 switch color {

Callers 1

applyStyleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected