How to Write a Neopixel Blade Style: Custom Lighting Effects for Proffieboard (2026)
Technical Guide
You have set up your Proffieboard and loaded your first sound font. Now learn how to control exactly what your blade looks like — from a simple breathing glow to an unstable plasma effect — by writing your own blade style from scratch.
A blade style is the code that tells your neopixel blade what to do — every pixel, every moment. Idle color, ignition animation, what happens when you swing, what the clash flash looks like, how the blade retracts. All of it lives in one style definition that sits inside your Proffieboard config file.
The ProffieOS style system looks intimidating because a complex style can run to hundreds of characters. But the logic underneath is simple: you stack layers, and each layer responds to a trigger. Once you understand that model, even a style you have never seen before becomes readable. This guide teaches you that model, then puts it to work across three hands-on examples at increasing difficulty.
This guide assumes your Proffieboard is already flashed with ProffieOS and you can successfully upload a config. If you have not done that yet, start with the Proffieboard Saber Setup Guide first, then come back here.
1. What Is a Blade Style?
![]()
Your Proffieboard config file contains a list of presets. Each preset pairs a sound font with a blade style. The sound font handles audio — the style handles light. They are independent: you can mix any font with any style, and changing one does not affect the other.
A blade style is a C++ template expression that ProffieOS compiles into instructions for your neopixel LED strip. At runtime, those instructions run dozens of times per second to calculate the color of every pixel based on the current state of the saber — whether it is idle, being swung, clashing, or being ignited.
The good news: you do not need to understand C++ to write useful blade styles. The ProffieOS style system is a domain-specific language built on top of C++. Its building blocks are named functions with descriptive names like Pulsing, RandomFlicker, and AlphaL. You compose them like LEGO bricks.
A blade style controls light only. A sound font controls audio only. Blade styles live in your .h config file. Sound fonts are folders of WAV files on your microSD card. Changing a blade style always requires a reflash. Changing a sound font on a v3 board with ProffieOS 6+ can be done through WebUSB without reflashing.
2. How Blade Styles Work: The Three-Layer Model

Every blade style, no matter how complex, is built from the same three-layer model:
- Base layer — the idle color of the blade. This is what you see when the saber is on but nothing is happening. Can be a solid color, a gradient, or an animated pattern.
- Effect layers — additional visuals that appear in response to events: swing shimmer, clash flash, stab tip effect, lockup glow. Each effect is composited on top of the base using an alpha (transparency) value.
-
Trigger conditions — the logic that activates each effect. ProffieOS provides built-in conditions like
IsSwinging,InOutFunc,Trigger, andOnthat correspond to saber states.
The Layers<> function is the container that stacks these layers from bottom to top. The bottommost layer is rendered first; each subsequent layer composites over it. A layer with a zero alpha value is invisible. A layer with a full alpha value completely replaces whatever is below it at that pixel.
Think of blade styles like image editing in layers. The base layer is your background. Each effect layer is a layer above it with a blend mode. The trigger condition controls when that layer becomes visible. Layers<> is the canvas that composites them all.
3. Reading the Syntax Without Panic
Before writing your first style, spend two minutes learning to read one. Here is the simplest valid blade style: a single solid blue blade with a white clash flash.
Breaking this down:
| Part | What it does |
|---|---|
StylePtr<…>() |
Required outer wrapper for all blade styles. Always present, always at the top and bottom. |
Layers<A, B, C> |
Stacks layers bottom to top. A is rendered first (base), C is on top. |
Blue |
Built-in color constant. ProffieOS includes all basic colors. Custom colors use Rgb<R,G,B>. |
AlphaL<Color, Alpha> |
Renders Color at the given Alpha transparency. Alpha = 0 is invisible, 32768 is fully opaque. |
Bump<pos, size, trigger> |
Creates a bell-curve shape at a position on the blade, driven by a trigger. |
Clash<threshold> |
Returns a value based on detected impact force. Higher threshold = less sensitive. |
ProffieOS styles use C++ template syntax, where parameters go inside < > angle brackets instead of ( ) parentheses. Every opening < needs a matching closing >. A mismatched bracket is the most common compile error. Count your brackets before uploading.
4. Example A — Breathing Glow Beginner

Example A
Crimson breathing glow — idle blade that slowly pulses between bright and dim
The simplest animation you can add to a blade: a slow, rhythmic brightness pulse that makes the saber look alive. No layers needed — just a single animated color as the base.
Modifying this example
-
Change the color: replace the
Rgb<R,G,B>values. R, G, B each range from 0 to 255. For a blue breath:Rgb<0,0,200>andRgb<0,0,30>. -
Change the speed: lower the millisecond value for a faster pulse (e.g.
800), higher for a slower one (e.g.4000). A resting heartbeat is around1000. - Make it subtler: bring the two color values closer together so the brightness range is smaller.
ProffieOS includes named color constants: Red, Green, Blue, Cyan, Magenta, Yellow, White, Black. You can use them directly instead of Rgb<> values. Pulsing<Red, Black, 2000> is equivalent to the example above and easier to read.
5. Example B — Flash-on-Clash Intermediate

Example B
Blue base with white flash-on-clash — a bright burst at the impact point when blades collide
Flash-on-clash (FoC) is the white or bright burst that appears on the blade when it makes contact. This example adds a clash-triggered layer on top of any base color. The technique works with any base — just swap Blue for whatever color you want underneath.
What each parameter controls
| Parameter | Effect of increasing | Effect of decreasing |
|---|---|---|
Clash<26000> |
Less sensitive — requires a harder impact to trigger | More sensitive — triggers on lighter contact |
Int<32768> (peak alpha) |
Brighter, more opaque flash | Dimmer, more translucent flash |
Inner color (White) |
Replace with any color for a colored clash flash — e.g. Yellow for a Mandalorian-style hit |
|
Layering FoC on top of Example A
The power of Layers<> is that you can combine any base with any effect. To add a clash flash to the breathing glow from Example A, replace Blue in Example B with the full Pulsing<> expression from Example A:
You can stack as many layers inside Layers<> as you like. Common additions on top of FoC: a swing shimmer layer using IsSwinging, a lockup effect using Lockup, and a drag effect at the blade tip using Drag. Each is an independent AlphaL<> block added to the layer list.
6. Example C — Unstable Plasma Advanced

Example C
Unstable plasma — a flickering, crackling blade with random electric arc bursts, inspired by Kylo Ren's crossguard saber
The unstable plasma effect combines three overlapping flicker functions to create an organic, non-repeating electrical arc pattern. No two moments look identical. This is computationally heavier than Examples A and B — if you notice the blade stuttering, it is a sign that your SD card read speed is the bottleneck, not the board itself.
Understanding the flicker functions
| Function | Character | Best used for |
|---|---|---|
BrownNoiseFlicker |
Smooth, organic variation — like a flame | Base layer of any unstable blade |
RandomFlicker |
Instant random jumps between two values — harsh | Electric arc bursts, rapid spark layer |
Strobe<on, off, Hz, jitter> |
Regular on/off cycling with optional timing randomness | Crackling secondary arc with rhythm |
Tuning the plasma effect
-
More chaotic: increase the
BrownNoiseFlickerintensity value above200, and increase theRandomFlickermax alpha above16000. -
Calmer / less flicker: reduce intensity to
100or below, and lower both arc layer alphas. -
Different color plasma: a purple plasma uses
Rgb<100,0,180>as the primary andRgb<180,100,255>as the arc color. A green toxic variant:Rgb<0,160,0>primary with yellow-green arcs. - If you see stuttering: this is almost always SD card latency. Format the SD card to FAT32, or use a Class 10 / A1-rated card. The board is not the bottleneck.
Multiple RandomFlicker and Strobe layers running simultaneously are computationally intensive. On Proffieboard v2.2, very complex styles with six or more animated layers may cause minor timing irregularities in the sound engine. If you notice audio stuttering alongside visual complexity, simplify the style by removing one arc layer at a time until audio is smooth. v3 / v3.9 boards have significantly more processing headroom and handle complex styles without issue.
7. Test, Upload & Switch Styles

A blade style does nothing on its own — it needs to be registered as a preset in your config file. Here is how a preset entry looks:
-
Paste your style into the preset
Replace the
StylePtr<…>()placeholder in an existing preset with one of the styles from this guide. Save the config file. -
Compile and check for bracket errors
In Arduino IDE, click the Verify (✓) button before uploading. This compiles the config without flashing the board. Any bracket mismatch or typo shows as a red error at the bottom. Fix the error, then verify again.
-
Upload to the board
Once Verify passes with no errors, click Upload (→). The saber emits a brief distorted sound when flashing completes, then starts normally with the new style active.
-
Switch between presets on the saber
With the default SA22C prop, hold the power button and click the auxiliary button to cycle through presets. Each preset can have a different blade style, so you can load multiple styles and switch between them without reflashing.
Always use Verify (✓) before Upload (→). Verify catches all syntax errors without touching the board. Upload without verifying first means a bad config gets sent mid-flash, which can leave the board in an unexpected state — not broken, but requiring a manual bootloader reset to recover. One extra click saves the trouble.
8. Where to Find More Styles
Writing styles from scratch is one path. Borrowing from the community and modifying is faster, and how most people start.
- Fett263 Style Library — the largest curated collection of ProffieOS blade styles, free to use. Every style is documented with parameter explanations. Start here if you want ready-made quality without writing a single line.
- The Crucible (therebelarmory.com) — the main ProffieOS community forum. The blade style sharing threads are active, and the developers (including ProffieOS creator Fredrik Hubinette) are regularly present to answer questions.
- ProffieOS Style Editor — a web-based visual editor at fredrik.hubbe.net that lets you build styles by selecting options in a UI, then generates the corresponding style code. Good for learning what each function produces visually.
- ProffieOS GitHub — the source repository contains full documentation for every built-in function, including parameters and example usage.
Styles shared by the community may be written for a specific ProffieOS version. Before copying a style, check the thread for any version notes. A style written for ProffieOS 6 will not compile in ProffieOS 4, because some functions were added or renamed between versions. The thread that shared the style usually states which version it was written for.
Blade Style FAQ
Do blade styles work on Xenopixel boards?
No. ProffieOS blade styles are specific to Proffieboard. Xenopixel runs its own proprietary firmware with a fixed set of built-in effects that you select through an in-hilt menu — there is no way to upload custom code. If custom blade styles are important to you, Proffieboard is the board to choose.
How many blade styles can I have loaded at once?
As many presets as your config file has room for, subject to the memory limits of your board. In practice, v2.2 boards comfortably handle 10–20 presets with complex styles before memory pressure becomes a concern. v3 / v3.9 boards have significantly more memory and can hold many more. If you hit a memory limit, the compiler will report it — you will not brick the board, you will just need to reduce the number of presets.
Can I switch blade styles without reflashing the firmware?
You can switch between presets already loaded on the board without reflashing — use the button combination for your prop file (hold power, click aux with the SA22C prop). To add a new style that is not already in a preset slot, you do need to reflash. On v3 / v3.9 boards with ProffieOS 6+, the WebUSB Workbench lets you change which preset is active and adjust some parameters without a full reflash, but adding an entirely new blade style expression still requires editing the config and uploading.
My blade style is not compiling. What should I check first?
In order: (1) Count angle brackets — every < must have a matching >. The compiler error message usually points to the line where the mismatch becomes apparent, which is often near the end of the style. (2) Check for missing commas between arguments inside a function. (3) Verify that all function names are spelled correctly — ProffieOS is case-sensitive. randomFlicker will fail; RandomFlicker is correct. Copy the full error text and search it on The Crucible — almost every compile error has a thread with a solution.
Why does my blade look different from the style preview I saw online?
Three common reasons: (1) Your blade has a different LED count than the preview — some effects scale with blade length, so a 132-LED blade looks different from a 144-LED one. (2) Your blade uses a different LED density or strip type, which affects brightness and color accuracy. (3) The preview was rendered in the ProffieOS Style Editor, which is a simulation — real hardware always looks slightly different in terms of brightness and saturation.
Can I use the same blade style on a baselit saber?
No. Blade styles are instructions for neopixel LED strips — they address individual pixels by position. A baselit saber has a single LED (or a few LEDs) at the hilt base that illuminate the whole blade at once, with no per-pixel control. The style will compile and the board will run, but the visual output will simply be the average color of the style at full brightness, with no animation or effects visible.
The unstable plasma style makes my saber stutter. How do I fix it?
Stuttering is almost always SD card read speed, not board processing speed. First: reformat the SD card to FAT32 (not exFAT) and re-copy all files. Second: if you have a generic or slow card, replace it with a Class 10 or A1-rated microSD. Third: if the issue only appears with very complex styles on a v2.2 board, try removing one RandomFlicker or Strobe layer at a time until the stutter stops — this is the CPU limit being reached on older hardware. v3 / v3.9 boards rarely exhibit this issue.
Ready to put your blade style into action? Browse our full Proffieboard saber lineup — every build ships with ProffieOS pre-installed and ready to customize.
Shop Proffieboard Sabers Support Center