package main import ( "barista.run/colors" "github.com/lucasb-eyer/go-colorful" ) func configureColors() { colors.LoadBarConfig() bg := colors.Scheme("background") fg := colors.Scheme("statusline") if fg != nil && bg != nil { iconColor := fg.Colorful().BlendHcl(bg.Colorful(), 0.5).Clamped() colors.Set("dim-icon", iconColor) _, _, v := fg.Colorful().Hsv() if v < 0.3 { v = 0.3 } colors.Set("bad", colorful.Hcl(40, 1.0, v).Clamped()) colors.Set("degraded", colorful.Hcl(90, 1.0, v).Clamped()) colors.Set("good", colorful.Hcl(120, 1.0, v).Clamped()) } }