MCPcopy Create free account
hub / github.com/KMKfw/kmk_firmware / decrease_hue

Method decrease_hue

kmk/extensions/rgb.py:279–293  ·  view source on GitHub ↗

Decreases hue by step amount rolling at 0 and returning to 256 :param step:

(self, step=None)

Source from the content-addressed store, hash-verified

277 self._do_update()
278
279 def decrease_hue(self, step=None):
280 '''
281 Decreases hue by step amount rolling at 0 and returning to 256
282 :param step:
283 '''
284 if step is None:
285 step = self.hue_step
286
287 if (self.hue - step) <= 0:
288 self.hue = (self.hue + 256 - step) % 256
289 else:
290 self.hue = (self.hue - step) % 256
291
292 if self._check_update():
293 self._do_update()
294
295 def increase_sat(self, step=None):
296 ''&#x27;

Callers 1

_rgb_hudMethod · 0.95

Calls 2

_check_updateMethod · 0.95
_do_updateMethod · 0.95

Tested by

no test coverage detected