Coder Social home page Coder Social logo

openrgb-python's Introduction

openrgb-python

Documentation Status

A python client for the OpenRGB SDK

I started this project because I wanted to be able to control the color of my lights based on temps. I tried to implement the features in the best (easiest to use) way possible.

SDK Feature Support:

  • Setting client name
  • Getting device info
  • Setting color by device
  • Setting color by zone
  • Setting color by led
  • Setting mode
  • Setting custom mode
  • Resizing zones

Additional Features (Not part of the OpenRGB SDK):

  • Loading profiles
  • Saving profiles

Installation

requires python >= 3.7

Use this method for the newest, but possibly buggy, package:

pip3 install git+https://github.com/jath03/openrgb-python#egg=openrgb-python

Arch Linux: yay -S python-openrgb-git

For a more stable package:

pip3 install openrgb-python

Arch Linux: yay -S python-openrgb

Thanks to @GabMus for the AUR packages

Usage

from openrgb import OpenRGBClient
from openrgb.utils import RGBColor, DeviceType

client = OpenRGBClient()

client.clear() # Turns everything off

motherboard = client.get_devices_by_type(DeviceType.DEVICE_TYPE_MOTHERBOARD)[0]

motherboard.set_color(RGBColor(0, 255, 0))
motherboard.zones[0].set_color(RGBColor(255, 0, 0))
motherboard.zones[1].leds[0].set_color(RGBColor.fromHSV(0, 100, 100))
motherboard.set_mode("breathing")
client.save_profile("profile1")

API docs

https://openrgb-python.readthedocs.io/en/latest/

For an alternative python implementation, check out B Horn's OpenRGB-PyClient

openrgb-python's People

Contributors

jath03 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.