MCPcopy Create free account
hub / github.com/pyfa-org/Pyfa / iconName

Method iconName

graphs/style.py:41–47  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

39
40 @property
41 def iconName(self):
42 # Get lightness out of RGB color, see following link for math:
43 # https://www.niwa.nu/2013/05/math-behind-colorspace-conversions-rgb-hsl/
44 r, g, b, a = (c / 255 for c in wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOW))
45 l = (max(r, g, b) + min (r, g, b)) / 2
46 suffix = '_black' if l > 0.3 else '_white'
47 return '{}{}'.format(self._iconNamePrefix, suffix)
48
49
50# In HSL format

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected