Introduce Rofi adapter, Serpensortia theme, and additional scripts for anime playback and theme customization
This commit is contained in:
@@ -56,6 +56,17 @@ func (c Color) Alpha(bg Color, amount float64) string {
|
||||
return formatHexRGB(r, g, b)
|
||||
}
|
||||
|
||||
func (c Color) RGBA(alpha int) string {
|
||||
r, g, b, ok := parseHexRGB(c.Value)
|
||||
if !ok {
|
||||
return c.Value
|
||||
}
|
||||
if alpha < 100 {
|
||||
return "rgba ( " + strconv.Itoa(int(r)) + ", " + strconv.Itoa(int(g)) + ", " + strconv.Itoa(int(b)) + ", " + strconv.Itoa(alpha) + " % )"
|
||||
}
|
||||
return c.Value
|
||||
}
|
||||
|
||||
func (c *Color) UnmarshalText(text []byte) error {
|
||||
c.raw = strings.TrimSpace(string(text))
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user