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

Method decrease_sat

kmk/extensions/rgb.py:308–319  ·  view source on GitHub ↗

Decreases saturation by step amount stopping at 0 :param step:

(self, step=None)

Source from the content-addressed store, hash-verified

306 self._do_update()
307
308 def decrease_sat(self, step=None):
309 '''
310 Decreases saturation by step amount stopping at 0
311 :param step:
312 '''
313 if step is None:
314 step = self.sat_step
315
316 self.sat = clamp(self.sat - step, 0, 255)
317
318 if self._check_update():
319 self._do_update()
320
321 def increase_val(self, step=None):
322 '''

Callers 1

_rgb_sadMethod · 0.95

Calls 3

_check_updateMethod · 0.95
_do_updateMethod · 0.95
clampFunction · 0.90

Tested by

no test coverage detected