Converts colors to code. Return format: "32;45;3".
(colors ...Color)
| 370 | // Converts colors to code. |
| 371 | // Return format: "32;45;3". |
| 372 | func colors2code(colors ...Color) string { |
| 373 | if len(colors) == 0 { |
| 374 | return "" |
| 375 | } |
| 376 | |
| 377 | var codes []string |
| 378 | for _, c := range colors { |
| 379 | codes = append(codes, c.String()) |
| 380 | } |
| 381 | |
| 382 | return strings.Join(codes, ";") |
| 383 | } |