openrgb-python icon indicating copy to clipboard operation
openrgb-python copied to clipboard

Device enable flag and RGBColor additional methods

Open Emiliopg91 opened this issue 9 months ago • 1 comments

Device class:

  • 'Enabled' flag for device. if is setted to false, packages led/zone update packages wont be sent saving CPU and network usage

RGBColor class:

  • toHex method to get hex string representation of color
  • toHsv method to get equivalent HSV representation of RGB color
  • mul method to multiply RGB componentes with a number between 0 and 1. Useful to dim colors, which is required to "apply brightness"

Emiliopg91 avatar Apr 08 '25 19:04 Emiliopg91

I like the changes listed, but there are a lot of unrelated changes in styling. Can you clean up the PR to only include the listed changes and keep styling consistent with the rest of the project?

Another change I'd prefer, which is a bit of a nitpick, but instead of

if enabled:
    # do thing

I'd prefer

if not enabled:
    return
# do thing

jath03 avatar Apr 20 '25 15:04 jath03