Skip to main content

What is this library ?

This library allows a python application or script to change the keys backlight colors of a razer chroma compatible keyboard. A demo is also available.

How to install ?

Install https://www.razer.com/fr-fr/synapse-3.
Create an environment and activate it if you want to (optionnal).
Execute pip install razer-chroma-keyboard

How to test ?

Execute python -m razer_chroma_keyboard. You should see promptly (in less than 3 seconds) the result on your keyboard.

How to use as a library ?

Import with import razer_chroma_keyboard. For this example, also import time. Prepare your (R, G, B) color tuples matrix. So you know the dimensions, you can use this black matrix and modify it : m = [[(0, 0, 0) for _ in range(22)] for _ in range(6)]. Then you can use a with statement (to allow fine control of the connection) like this :

with razer_chroma_keyboard.razerServerChromaConnection() as connection :
    connection.apply_chroma_custom(m)
    while True: time.sleep(1)

The second line is because, when the with statement is left, the connection will be stopped, and the keyboard will back to it's previous state after a moment (if another software controls it). Example of full code to turn the whole keyboard into a specific color :

import razer_chroma_keyboard
import time

def change_color(color: tuple[int, int, int] = (50, 50, 50)):
    m = [[color for _ in range(22)] for _ in range(6)]
    with razer_chroma_keyboard.razerServerChromaConnection() as connection :
        connection.apply_chroma_custom(m)
        while True: time.sleep(1)

change_color((255, 191, 0)) #  Amber yellow.

Metadata

Release files for razer-chroma-keyboard 0.0.1.post2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for razer-chroma-keyboard 0.0.1.post2
File Size Uploaded Provenance
razer_chroma_keyboard-0.0.1.post2.tar.gz 4.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for razer-chroma-keyboard 0.0.1.post2
File Interpreter ABI Platform
razer_chroma_keyboard-0.0.1.post2-py3-none-any.whl Python 3 none any Details

Total release size: 10.4 kB

Release files / razer_chroma_keyboard-0.0.1.post2.tar.gz

Download URL razer_chroma_keyboard-0.0.1.post2.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6a7c028f3a7d26f9120851e003280694a4340b722dc4eb5e94d9497eff2f3770
BLAKE2b-256 checksum
How to use checksums
4f3bc6f0c21ba422815300864068d2f8bb5a28f1ae1746a72ddd8721a88cc374
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.0

Release files / razer_chroma_keyboard-0.0.1.post2-py3-none-any.whl

Download URL razer_chroma_keyboard-0.0.1.post2-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ac18486be81e532de806b6a745e022ba4007e78e32a0724f47230b7ecb034da2
BLAKE2b-256 checksum
How to use checksums
b9afd9cc874f6e7b2bb0f2dcfeef3734ff821925feae016e90dcfe5e0c252976
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.0

Security for razer-chroma-keyboard 0.0.1.post2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page