File tree Expand file tree Collapse file tree 3 files changed +24
-245
lines changed
Expand file tree Collapse file tree 3 files changed +24
-245
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ '''
2+ RΛZΞR Chroma Shell.
3+ https://github.com/amahlaka/Razer-chroma-python-shell
4+
5+ Simple tool to try out the Razer Chroma API using python.
6+ Install requirements with: pip install -r requirements.txt
7+
8+ You are free to use this any way you like
9+
10+ Created by: Arttu Mahlakaarto (Amahlaka)
11+ Version: 0.4-Alpha
12+ '''
113import webcolors
214import threading
315import requests
416import time
517
618
719def RGBtoBRG (rgb ):
20+ '''Changes the color from RGB format to BRG format. '''
821 print (rgb )
922 for indx , color in enumerate (rgb ):
10- if rgb [indx ] == 0 :
23+
24+ if color == 0 :
1125 rgb [indx ] = rgb [indx ] + 1
26+
1227 red = rgb [0 ]
1328 green = rgb [1 ]
1429 blue = rgb [2 ]
@@ -54,10 +69,10 @@ class Razer_api():
5469 }
5570 sdk_information = {
5671 "title" : "Razer Chroma SDK Python shell" ,
57- "description" : "This is a python shell that controls the SDK " ,
72+ "description" : "Example usage of Chroma API thru Python " ,
5873 "author" : {
5974 "name" : "Arttu M." ,
60- "contact" : "www.razerzone. com"
75+ "contact" : "https://github. com/amahlaka/Razer-chroma-python-shell/issues "
6176 },
6277 "device_supported" : [
6378 "keyboard" ,
@@ -114,6 +129,7 @@ def set_all(self, color_rgb):
114129 for indx ,row in enumerate (local_palette ['param' ]['color' ]):
115130 for index ,column in enumerate (row ):
116131 local_palette ['param' ]['color' ][indx ][index ] = color
132+ print (column )
117133 self .color_palette = local_palette
118134 self .send_palette (self .color_palette )
119135
Original file line number Diff line number Diff line change @@ -20,4 +20,8 @@ colorname <color> - Set entire keyboard to <color>
2020controls - set color only on keys usually used for gaming
2121check - show the current number of keepalive pings
2222quit - disconnect from api and exit
23- ```
23+ ```
24+
25+ #### Contributing:
26+ Feel free to fork and edit the code.
27+ If you come up with a new feature, feel free to create a pull request.
You can’t perform that action at this time.
0 commit comments