Chroma Design Guide


This guide provides code snippets and visual examples to explain how to create application and game animations using the Chroma Animation API. Chroma animations can play as game engine content and even play on web pages like this page. The design templates from [ChromaDesign_Template] are available to get started making a Chroma Design.

Getting Started Videos

Web Chroma Editor - Kitty Kraken Capture

Web Chroma Editor - Blend Tool - Trails

Chroma RGB - Gradient Tool

Chroma RGB - Text Tool

C++ Chroma Animation Sample App - Streaming on Windows PC and Cloud

UE4 Chroma Animation Sample App - Streaming on Windows PC and Cloud

Unity Chroma Animation Sample App - Streaming on Windows PC and Cloud

Chroma RGB - Quick Fire Animation
The [Web Chroma Editor] creates Chroma animations and code snippets from several input sources. Designers can create Chroma animations without writing any code. The toolset can use input sources as video, text, camera, web cam, desktop capture, gradients, patterns, images, and blended animations.
[OBS Studio] has a virtual camera feature which allows desktop capture to record Chroma animations from [gameplay] or even from streaming YouTube videos. The web app can generate [embedded code] to embed Chroma animations in source code for [multiple programming languages]. The web app supports [transform tools].

See the documentation on [Streaming Chroma RGB] to learn how to utilize the [Razer Streaming Portal]. Streaming can be controlled from the browser or from the Chroma API. See the [streaming logic flow]. Add the [Razer Streaming Panel] Twitch Extension to control Chroma RGB streaming from your live channel.

Sample Chroma plugins and projects with all the sample effects ported from this Chroma Design Guide are available for download.
Sample Description Branch (supports ASCII paths) Branch (supports Unicode paths)
C++ Chroma Sample App [master] [SUPPORT_UNICODE]
C++ Chroma Game Loop Sample [master] [SUPPORT_UNICODE]
C++ Chroma Game Sample [master] [SUPPORT_UNICODE]
C++ Chroma RGB Modding Sample [master] [SUPPORT_UNICODE]
C# Chroma Sample App [master] [SUPPORT_UNICODE]
C# Chroma Game Loop Sample [master] [SUPPORT_UNICODE]
C# Chroma Stream App [master]
Visual Basic Chroma Sample App [master]
Visual Basic Chroma Game Loop Sample [master]
Godot/Lua Chroma Sample App [master]
HTML5 Chroma Stream App [master]
Java Chroma Stream App [master]
ClickTeamFusion Chroma Stream App [master]
UE4 Chroma Sample Apps [master] [SUPPORT_UNICODE]
UE5 Chroma Sample Apps - [SUPPORT_UNICODE]
Unity Chroma Sample Apps [master] [SUPPORT_UNICODE]
Applications and games can integrate Chroma in two-ways.
  1. Designers can create Chroma Animations using the toolset and add animations as content directly to the game engine.
  2. Developers can use the API to manipulate arrays directly and set Chroma effects through code. The Chroma Game Loop Samples show how to blend several animations at the same time by using arrays.
These are some of the most common methods from the [Chroma API]. The Chroma Editor toolset is built on top of the same Chroma API that developers have access to.
The development cycle tends to shedule Chroma integration at the end of the development cycle. Chroma can be added before release or in an update/patch. Placing Chroma integration at the end shortens the development time by adding Chroma effects to existing game events.
The development time for Chroma integration is typically around 1 week for a single developer. Chroma Designs, code samples, and revisions can be provided by request to speed up the development process.
Some Chroma Design samples are available to review and see what kind of effect ideas are possible.
Chroma Design Link Miscellaneous
Amazing Frog [Chroma Design: Amazing Frog] -
Roblox [Chroma Design: Roblox] [Roblox Sample Chroma Mod]
Note: The Chroma Design Converter automates porting Chroma Designs to C++/Visual Basic/C#/Java/Lua/UE4/Unity on PC/XBOX platforms for apps and games.
Platform Link Screenshot
Web [ChromaDesignConverter]
Desktop [ChromaDesignConverter]
Note: The numbered button on each effect below will play the Chroma animation on connected Chroma hardware.
Note: Click on the keyboard canvas on each effect below to open the design editor.
Sprites
Download: ZIP Convert: ZIP
Animations can be created from sprites using the [Unity Plugin: Chroma Capture Tool]. In this case, a fish sprite was added to a plane in front of the capture camera. While capturing the sprite was translated and rotated to create a fish-like behaviour. Sprites with high contrast like this clown fish are going to be more recognizable on the physical hardware.
Trails
Download: ZIP Convert: ZIP
Animations can be created from trail renderers using the [Unity Plugin: Chroma Capture Tool]. When trails use textures with grayscale gradients the animation can be used as a template and later changed to any color. With the move tool trails can be puppeted across the screen to create a trail across the keyboard. Individual trails can be used for effects like weapon fire. Multiple trails can be moved to create effects like claws.
RGB Trails
Download: ZIP Convert: ZIP
The grayscale trail can be colorized at runtime using multiply RGB with min/max threshold.

Particles
Download: ZIP Convert: ZIP
Animations can be created from particle systems using the [Unity Plugin: Chroma Capture Tool].

Blue Particles
Download: ZIP Convert: ZIP
The grayscale particles can be colorized at runtime using multiply RGB.

Fade Start
Download: ZIP Convert: ZIP
The method 'fadeStartFrames' will fade in the start of an animation to black given the number of frames. The number of frames is relative from the first frame of the animation.

ChromaAnimation.fadeStartFrames(layerName, numberOfFrames);


Fade End
Download: ZIP Convert: ZIP
The method 'fadeEndFrames' will fade out the end of an animation to black given the number of frames. The number of frames is relative from the last frame of the animation.

ChromaAnimation.fadeEndFrames(layerName, numberOfFrames);


Blink
Download: ZIP Convert: ZIP
The methods 'fadeStartFrames' and 'fadeEndFrames' can be used to blink an animation layer.

Intensity
Download: ZIP Convert: ZIP
The method 'multiplyIntensity' multiplies layer RGB values by a floating point number which can also be used to fade parts of an animation.

ChromaAnimation.multiplyIntensity(animationName, frameId, intensity);


Original Layer - Clouds
Download: ZIP Convert: ZIP
Clouds 25%
Download: ZIP Convert: ZIP
The method 'multiplyIntensity' can the lower the intensity of an existing layer.

Multiply layer intensity by 25%.
Original Layer - B&W
Download: ZIP Convert: ZIP
Yellow B&W
Download: ZIP Convert: ZIP
The method 'multiplyIntensityRGB' multiplies layer RGB values by the red, green, and blue (0 to 255) values to tint the color of a layer.

ChromaAnimation.multiplyIntensityRGB(animationName, frameId, red, green, blue);


Cyan B&W
Download: ZIP Convert: ZIP
The method 'multiplyIntensityAllFramesRGB' will multiply intensity for red, green, and blue on all frames of the animation.

// Tint all frames in the animation to be cyan

Color Cycling
Download: ZIP Convert: ZIP
'multiplyIntensityColor' multiplies the intensity using a color. Use 'multiplyIntensityColor' with 'lerpColor' to create color transitions.


Original Layer - Trails
Download: ZIP Convert: ZIP

Threshold RGB
Download: ZIP Convert: ZIP
The method 'fillThresholdColorsRGB' sets an RGB value for non zero colors that are below a certain threshold.

ChromaAnimation.fillThresholdColorsRGB(animationName, frameId, threshold, red, green, blue);


More Green
Download: ZIP Convert: ZIP
Turn darker colors green.


Min/Max Threshold
Download: ZIP Convert: ZIP
Change light and dark colors.


Original Layer - Arc
Download: ZIP Convert: ZIP
Copy Layer
Download: ZIP Convert: ZIP
The method 'copyNonZeroAllKeys' copies the non zero colors from one layer to another.

ChromaAnimation.copyNonZeroAllKeys(animationName, sourceAnimationName, targetAnimationName, frameId);


Remove Darker Colors
Download: ZIP Convert: ZIP
Copy a layer while matching the background color in dark areas.


Add Layer
Download: ZIP Convert: ZIP
Add a layer to the background layer.


Subtract Layer
Download: ZIP Convert: ZIP
Subtract a layer from the background layer.


Intersect Layer
Download: ZIP Convert: ZIP
Copy intersecting nonzero colors to the background layer.


Duration Override
The method 'overrideFrameDuration' sets a uniform duration for all frames in the animation. The minimum duration is 0.033 (30 frames per second).

Original Layer - Movement UL
Download: ZIP Convert: ZIP

30 FPS
Download: ZIP Convert: ZIP
Set the animation playback to 30 FPS. This is the recommended animation playback speed so that visuals playback smoothly.


Reverse Frames
Download: ZIP Convert: ZIP
Reverse the order of the animation frames.


Invert Color
Download: ZIP Convert: ZIP
Invert the animation colors.


Mirror Frames
Download: ZIP Convert: ZIP
Duplicate the animation frames and mirror.


Pause Frames
Download: ZIP Convert: ZIP
Add a pause delay to the animation.


Reduce Frames
Download: ZIP Convert: ZIP
Reducing the number of frames is another way to speed up the animation.


Duplicate Frames
Download: ZIP Convert: ZIP
Doubling the number of frames is another way to slow down the animation.


Trim Start
Download: ZIP Convert: ZIP
Trim the start of the animation. This eliminates blank frames so that the animation starts faster.


Trim End
Download: ZIP Convert: ZIP
Trim the end of the animation. This eliminates several blank frames so that the animation wraps immediately.


Duplicate First Frame
Download: ZIP Convert: ZIP
Some animations are a single frame and are used as a shape template. When the animation is used for intersecting operations, the first frame needs to be duplicated to match the animation length used in a copy/add/subtract/fade operation.


Random B&W
Download: ZIP Convert: ZIP
Random black and white colors can be used to add variability to an animation.


Random Sparse
Download: ZIP Convert: ZIP
Threshold can be used to make random keys more sparse.


Rain
Download: ZIP Convert: ZIP
Threshold can be used to make random keys more sparse and assign a color.


Idle Animation
Download: ZIP Convert: ZIP
The method 'useIdleAnimation' enables or disables the idle animation mechanism. If the flag is `true`, the idle animation will play when no other animations are playing. If the flag is `false` the idle animation is disabled.


Reactive Keyboard
Download: ZIP Convert: ZIP
Randomly select a key and circle outward from that key over the length of frames.

Drawing a line between two keys
Download: ZIP Convert: ZIP
Randomly select two keys and draw a line from one to the other.

Hotkeys Layer
Download: ZIP Convert: ZIP
Set hotkeys to a color on top of an animation layer.

Animated Hotkeys
Download: ZIP Convert: ZIP
Set animated hotkeys on top of another animation layer.

Health bar
Download: ZIP Convert: ZIP
Show health bar on the F-Keys.

Ammo bar
Download: ZIP Convert: ZIP
Show ammo bar on the F-Keys.

Embedded Animations
Download: ZIP Convert: ZIP
Show loading a Chroma Animation from embedded data.