/Colore

A powerful C# library for Razer Chroma's SDK

Primary LanguageC#MIT LicenseMIT

Colore

MIT License Latest GitHub release NuGet package

A powerful and elegant C# library for Razer Chroma's SDK.

GitHub AppVeyor Travis
master Workflow status Build status TravisCI Status
develop Workflow status Build status TravisCI Status
master Test status Codecov coverage CodeFactor
develop Test status Codecov coverage CodeFactor

Getting started

If you are a new developer and are looking for a helpful guide on how to get started, head on over to the documentation which describes getting Colore installed and running some example code.

Contributing

Discussions Discord

For discussing, you can discuss right here in the repo or join the Razer Community Discord server using the badges above. If you want to join the Slack chat, contact Adam Hellberg (sharparam@sharparam.com).

Contributors are very welcome! If you have code fixes, please submit a pull request here on GitHub.

If you want to join the development team, please contact Sharparam on GitHub.

All authors and contributors are listed in the AUTHORS file. Feel free to add yourself to this file under a relevant section in your pull request.

Please read the CONTRIBUTING.md file before making a pull request.

Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

License

Copyright © 2015-2021 by Adam Hellberg and Brandon Scott.

This project is licensed under the MIT license, please see the file LICENSE for more information.

Razer is a trademark and/or a registered trademark of Razer USA Ltd. All other trademarks are property of their respective owners.

Installing

Using Colore in your project is simple, all you have to do is install it with NuGet!

Install-Package Colore

Or using the .NET CLI tools:

dotnet add package Colore

You can also search for it in Visual Studio by right clicking your project and choosing "Manage NuGet Packages..." and install it the GUI way.

Pre-releases

New release candidate versions will be uploaded to NuGet and marked as pre-releases there (vX.Y.Z-rcDDDD).

You can also find pre-release versions for Colore and any additional extensions in the GitHub package registry. The GitHub package registry will be the place where you'll always find the most bleeding edge packages.

Extensions

The WPF and WinForms extension packages for Colore are not yet available for the new Colore version, but will be on NuGet soon™, so stay tuned!

Using

Obtain a reference to an IChroma instance by calling Colore.ColoreProvider.CreateNative().

This instance initializes the Chroma SDK so it is important you save this reference for the lifetime of your application! If you need to dispose of it and obtain a new one later, be sure to call the uninitialize method first!

Colore supports binding to both the native Chroma SDK and the REST API. To use the REST API, create an IChroma instance by calling Colore.ColoreProvider.CreateRestAsync(AppInfo). The REST API requires information about your application, so you'll have to pass an instance of AppInfo to CreateRestAsync containing details about your application or game.

For a more in-depth guide on how to get started, check out our wiki.

For more information on the native and REST SDKs that Colore uses, check out Razer's official page for the Chroma SDK and their page about SDK tools.

Dependencies

Colore depends on the Razer Chroma SDK (RzChromaSDK64.dll or RzChromaSDK.dll).

The Razer Chroma SDK is provided by Razer and installed together with the Synapse application. More information can be read on their website.

Other dependencies are installed via NuGet and listed in each project file.

Building

Colore supports building for multiple target frameworks. At the moment, these are .NET Standard 1.3 and .NET Framework 4.5.1. When building the project, DLLs for both frameworks will be generated in the output folders, under the folder names netstandard1.3 and net451. Use the ones fitting for your application.

The below examples compiles Colore in Release mode.

.\build.ps1 -Configuration Release

You can also use the "CI" build target to generate the same artifacts made available for each release of Colore.

.\build.ps1 -Configuration Release -Target CI

You will find the resulting artifact files under the artifacts folder in the root of the repository.

Note that the above commands are executed with PowerShell. If you are building on a Linux system or macOS, use the build.sh script in place of build.ps1 (you may have to make it executable first with chmod +x build.sh).

Native Documentation

As Colore is built upon the native Chroma SDK for C++, it can be worth taking a look at their documentation.

REST Documentation

Colore's REST mode is built on Razer's official REST API, which has its own documentation.

Razer Chroma Workshop

Many of the games and apps featured on the Razer Chroma Workshop have used the Colore library.

The official Razer Chroma Workshop is your one-stop-shop to get the most out of your Chroma devices. Whether it's smart lighting based on in-game events, standalone apps or stunning profiles created by fans around the world, the Chroma Workshop is where you can explore, download and even share your own creations.

Games using Colore

The following games (powered by Unity) are using Colore:

DubWars Masquerada: Songs and Shadows Nevermind Please, Don't Touch Anything 3D Starcrawlers The Little Acre

Projects using Colore

Aurora - Unified lighting effects across multiple brands and various games. (GitHub)

There may be others we are unaware of, so please let us know if there are any others.