MCPcopy Create free account
hub / github.com/SolarLune/masterplan / Color

Method Color

contents.go:665–681  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

663}
664
665func (nc *NumberedContents) Color() Color {
666
667 color := getThemeColor(GUINumberColor)
668 completedColor := getThemeColor(GUICompletedColor)
669
670 if nc.Card.CustomColor != nil {
671 color = nc.Card.CustomColor
672 h, s, v := nc.Card.CustomColor.HSV()
673 completedColor = NewColorFromHSV(h+0.04, s-0.2, v+0.2)
674 }
675
676 if !nc.Card.Properties.Get("hideMax").AsBool() && nc.PercentageComplete >= 0.99 {
677 return completedColor
678 } else {
679 return color
680 }
681}
682
683func (nc *NumberedContents) Trigger(triggerType int) {
684

Callers

nothing calls this directly

Calls 5

getThemeColorFunction · 0.85
NewColorFromHSVFunction · 0.85
HSVMethod · 0.80
AsBoolMethod · 0.80
GetMethod · 0.45

Tested by

no test coverage detected