github.com/orteth01/up@v0.2.0/internal/colors/colors.go (about)

     1  // Package colors provides colors used by the CLI.
     2  package colors
     3  
     4  import (
     5  	color "github.com/aybabtme/rgbterm"
     6  )
     7  
     8  // Func is a color function.
     9  type Func func(string) string
    10  
    11  // Gray string.
    12  func Gray(s string) string {
    13  	return color.FgString(s, 150, 150, 150)
    14  }
    15  
    16  // Blue string.
    17  func Blue(s string) string {
    18  	return color.FgString(s, 77, 173, 247)
    19  }
    20  
    21  // Cyan string.
    22  func Cyan(s string) string {
    23  	return color.FgString(s, 34, 184, 207)
    24  }
    25  
    26  // Green string.
    27  func Green(s string) string {
    28  	return color.FgString(s, 0, 200, 255)
    29  }
    30  
    31  // Red string.
    32  func Red(s string) string {
    33  	return color.FgString(s, 194, 37, 92)
    34  }
    35  
    36  // Yellow string.
    37  func Yellow(s string) string {
    38  	return color.FgString(s, 252, 196, 25)
    39  }
    40  
    41  // Purple string.
    42  func Purple(s string) string {
    43  	return color.FgString(s, 96, 97, 190)
    44  }