Skip to content

Commit a14280c

Browse files
authored
Merge pull request #1 from amahlaka/V0.4
V0.4 - More documentation
2 parents 51a03ae + 0953f7c commit a14280c

File tree

3 files changed

+24
-245
lines changed

3 files changed

+24
-245
lines changed

old_code_dont_use.py

Lines changed: 0 additions & 241 deletions
This file was deleted.

razer_api_shell.py

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,29 @@
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+
'''
113
import webcolors
214
import threading
315
import requests
416
import time
517

618

719
def 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

readme.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,8 @@ colorname <color> - Set entire keyboard to <color>
2020
controls - set color only on keys usually used for gaming
2121
check - show the current number of keepalive pings
2222
quit - 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.

0 commit comments

Comments
 (0)