CRYSTAL FOCUS X
Unstable Effects Collection
PART 9 OF 18
Unstable series · Rainbow · unstable=9

Rainbow (unstable=9)

A practical guide to the Rainbow effect on Crystal Focus X, including hue ranges, scroll speed, static candy-cane mode, direction, brightness and saturation control, audio overlay, and ready-to-use recipes for full-spectrum scrolls, sunset bands, ocean tones, and static stripes.

What you will learn
  • How Rainbow switches between scrolling and static modes
  • How hue start and end values define the active color range
  • How stripe density and transition width work
  • How to tune recipes you can paste into your blade profile
Main parameters
Motion
spark, drift
Hue range
lcool, hcool
Structure
sparkd, mapb, mapc, fxmap
Best used for
  • Full-spectrum scrolling blades
  • Static rainbow gradients
  • Candy-cane stripe patterns
  • Restricted hue themes like fire or ocean
Series: Customizing Unstable Effects on Crystal Focus X · Guide 9 of 18

Introduction

The Rainbow effect (unstable=9) paints every pixel on the blade with a color taken from the HSV color wheel. You can use the full wheel or only a selected slice of it, then either keep the pattern still or let it scroll continuously along the blade.

Rainbow has two distinct operating modes built into the same effect: a scrolling mode when spark > 0, and a static mode when spark=0.

What Rainbow Does

ModeConditionBehavior
Scrollingspark > 0The hue pattern advances every frame and slides along the blade
Staticspark = 0The hue pattern is fixed in place as repeating bands or one full gradient

Enabling Rainbow

In your blade profile section, set:

unstable=9

Parameter Reference

ParameterRole in Rainbow
unstableSet to 9 to select Rainbow
sparkScroll speed. 0 means static mode
sparkdTransition width in scrolling mode, or repeat count behavior in static mode
lcoolHue range start
hcoolHue range end
driftScroll direction
mapbOverall brightness
mapcOverall saturation
fxmapAudio mapping mode

Hue-Angle Quick Reference

lcool and hcool are values from 0 to 255, mapped across the full 0° to 360° hue wheel. These landmarks are useful when choosing a range:

ColorApprox. ValueHue Angle
Red0
Yellow42~60°
Green85~120°
Cyan127~180°
Blue170~240°
Magenta213~300°
Red wrap255360°

How the Scroll Works

  1. Speed increment is derived from spark
  2. Lockup triples that speed, and clash doubles it
  3. A running hue counter wraps around the 360° color wheel
  4. Each pixel reads a hue from the moving counter plus or minus its blade position
  5. drift controls which direction the rainbow travels

Restricted Hue Range

When lcool and hcool do not span the full wheel, the pattern is remapped into that chosen range. To avoid a harsh jump where the range loops back around, Rainbow uses a transition zone. The width of that transition zone is controlled by sparkd.

Higher sparkd values make the wrap smoother. Lower values make the edge sharper.

Static Mode

When spark=0, the scroll is fully disabled. In that case sparkd determines how many times the rainbow pattern repeats along the blade.

sparkdStatic Result
100One full rainbow over the whole blade
50Two repeats
25Four repeats
10About ten repeats, tight candy-cane stripes

Motion Controls

spark — Scroll Speed

This controls how fast the rainbow moves when scrolling mode is active.

ValueVisual Result
0Frozen, static mode
5–20Very slow drift
60–100Moderate, clearly visible scrolling
150+Fast, energetic movement
220+Very fast travel
Important: Lockup triples the scroll speed and clash doubles it, so moderate normal values often look best.

drift — Scroll Direction

drift=1    Forward
drift=0    Reverse

This changes the direction of travel. It does not change which colors are present, only how they move.

Brightness & Saturation Controls

mapb — Overall Brightness

This controls the overall brightness passed into the rainbow color generation.

mapc — Overall Saturation

This controls the overall saturation. Lower values make the rainbow softer and more pastel. Higher values make it vivid and fully saturated.

SettingLook
High mapb, high mapcBright, vivid rainbow
High mapb, medium mapcBright but softer colors
Lower mapb, medium mapcDimmer, moodier rainbow
High mapb, low mapcPastel rainbow

Audio & Combat Interaction

TriggerEffect
Audio mapping (fxmap=1)Fx color blends into every pixel based on sound volume
LockupScroll speed × 3
ClashScroll speed × 2

fxmap — Mapping Mode

fxmap=0    No audio response
fxmap=1    Audio-reactive Fx color blend

With audio mapping enabled, the blade not only gets the moving rainbow, but also an extra Fx color blend during louder audio.

Putting It All Together: Recipes

Recipe 1: Full-Spectrum Scroll

A classic smooth rainbow through the entire wheel.

unstable=9
spark=100
lcool=0
hcool=255
sparkd=50
drift=0
mapb=255
mapc=255

Recipe 2: Static Rainbow

A single still full-blade rainbow from emitter to tip.

unstable=9
spark=0
lcool=0
hcool=255
sparkd=100
mapb=255
mapc=255

Recipe 3: Candy Cane

Several repeating static rainbow bands.

unstable=9
spark=0
lcool=0
hcool=255
sparkd=25
mapb=255
mapc=255

Recipe 4: Warm Sunset

Restricted to reds, oranges, and yellows.

unstable=9
spark=60
lcool=0
hcool=42
sparkd=60
drift=0
mapb=255
mapc=255

Recipe 5: Ocean Tide

Scrolling blues and cyans with a watery feel.

unstable=9
spark=80
lcool=127
hcool=170
sparkd=50
drift=1
mapb=255
mapc=255

Recipe 6: Pastel Dream

A softer full-spectrum look with reduced saturation.

unstable=9
spark=50
lcool=0
hcool=255
sparkd=50
drift=0
mapb=200
mapc=128

Recipe 7: Audio-Reactive Neon

A fast bright rainbow with audio-driven Fx color pulses layered on top.

unstable=9
spark=150
lcool=0
hcool=255
sparkd=50
drift=0
mapb=255
mapc=255
fxmap=1

Quick Reference Card

KeyRainbow RoleDefault / Notes
unstableEffect modeSet to 9
sparkScroll speed, or static mode when 00–220+
sparkdTransition width or repeat densityDepends on scrolling vs static mode
lcoolHue range start0–255
hcoolHue range end0–255
driftScroll direction1 forward, 0 reverse
mapbBrightnessHigher = brighter
mapcSaturationHigher = more vivid
fxmapAudio reactivity0 none, 1 audio

Tuning Tips

  1. Reversing color order and reversing travel are not the same. Swapping lcool and hcool changes the hue order. Changing drift changes the motion direction.
  2. Candy-cane stripes only happen in static mode. Set spark=0 first, then adjust sparkd.
  3. Use the hue quick reference table as your starting point. Then fine-tune by a few values at a time.
  4. Higher sparkd in scrolling restricted-range mode gives a smoother wrap-around. Lower values make a sharper transition edge.
  5. Moderate scroll speeds usually look best for lockup. Very high normal speeds can become too fast when the ×3 lockup boost kicks in.
  6. Lower saturation is a great trick for softer fantasy blades.