MCPcopy
hub / github.com/pterm/pterm / colors2code

Function colors2code

color.go:372–383  ·  view source on GitHub ↗

Converts colors to code. Return format: "32;45;3".

(colors ...Color)

Source from the content-addressed store, hash-verified

370// Converts colors to code.
371// Return format: "32;45;3".
372func 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}

Callers 1

StringMethod · 0.85

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…