Skip to content

Commit

Permalink
perf: profit/loss gradients swapped
Browse files Browse the repository at this point in the history
  • Loading branch information
dsjkvf authored and 097115 committed Dec 5, 2023
1 parent 9e96044 commit aa1599c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions internal/ui/util/style.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ const (
//nolint:gochecknoglobals
var (
p = te.ColorProfile()
stylePricePositive = newStyleFromGradient("#C6FF40", "#779929")
stylePriceNegative = newStyleFromGradient("#FF7940", "#994926")
stylePricePositive = newStyleFromGradient("#779929", "#C6FF40")
stylePriceNegative = newStyleFromGradient("#994926", "#FF7940")
)

// NewStyle creates a new predefined style function
Expand Down Expand Up @@ -47,26 +47,26 @@ func stylePrice(percent float64, text string) string { //nolint:cyclop
}

if percent > 10.0 {
return out.Foreground(p.Color("70")).String()
return out.Foreground(p.Color("82")).String()
}

if percent > 5 {
return out.Foreground(p.Color("76")).String()
}

if percent > 0.0 {
return out.Foreground(p.Color("82")).String()
return out.Foreground(p.Color("70")).String()
}

if percent < -10.0 {
return out.Foreground(p.Color("124")).String()
return out.Foreground(p.Color("196")).String()
}

if percent < -5.0 {
return out.Foreground(p.Color("160")).String()
}

return out.Foreground(p.Color("196")).String()
return out.Foreground(p.Color("124")).String()

}

Expand Down

0 comments on commit aa1599c

Please sign in to comment.