RiggyTry it

Spine error: Color hexadecimal length must be 8

spine-csharp (Unity)
Color hexadecimal length must be 8, received: ff8800 — SkeletonJson.ToColor
spine-ts (web, Phaser, PixiJS)
(no error: six characters load as an opaque color) — Color.setFromString — no check

A slot color in skeleton.json is not eight hex characters rrggbbaa. The web runtime forgives it, so the file plays in the browser and breaks only when it reaches Unity.

Two runtimes, two readers

  • spine-csharp (Unity) takes the color in pairs of characters and refuses anything shorter than eight: ff8800 fails loading with this message. A leading # breaks it too, because the first pair becomes #f, which is not a hex number. The tint-black dark color is checked for exactly six.
  • spine-ts (web, Phaser, PixiJS) strips a leading # and treats any length other than eight as fully opaque, so ff8800 and #ff8800 show the intended color. Shorter strings leave color components unreadable (NaN).

Why it happens

The Spine editor always writes eight characters. Six-character colors come from hand edits, scripts and converters that write CSS-style colors — and because the web preview looks right, nobody notices until the Unity import.

How to fix it

Write every slot color as eight hex characters without # — append ff for full opacity — and every dark color as six.

"slots": [
  { "name": "glow", "bone": "body", "color": "ff8800" },     // Unity: rejected
  { "name": "glow", "bone": "body", "color": "#ff8800cc" },  // Unity: rejected
  { "name": "glow", "bone": "body", "color": "ff8800ff" }    // every runtime
]

Check your skeleton

The Spine JSON validator finds this in a skeleton.json before the runtime does, and names the exact place. It runs in your browser; the file is not uploaded. Riggy runs the same check on every rig it builds.

Other Spine runtime errors