Skip to content
SheetForge

Visual types

Color, AnimationCurve and Gradient carry values that are unreadable as raw text. Each type has a short form that a person can type and a canonical form that every tool writes.

Short and canonical forms

The text form is designed so that a person can type a short version by hand. Every tool always writes the canonical, complete form. That covers the editors, Export, Push and the web app.

A value survives sheet → Unity → sheet without loss. The round trip parse(render(parse(x))) == parse(x) holds for every accepted input.

Separators

All three types share their separators. The separators sit one level below the list separator.

  • , separates the items within a value.
  • : separates the fields inside an item.
  • | separates the sections.
  • @ attaches a key's time.

Whitespace around separators is trimmed.

Numbers use . as the decimal point everywhere. A decimal comma, as some locales write it, shows up as a wrong field count, never as a silently wrong value.

Lists

Elements of a List<> are still separated by ;. None of the three notations ever contains a ;, so a list splits cleanly.

TypeExample cell
List<Color>#F00;#0F0
List<AnimationCurve>0:0,1:1;0:1,1:0
List<Gradient>#F00,#00F;#0F0,#000

Color

FormNotation
Accepted input#RGB, #RGBA, #RRGGBB, #RRGGBBAA
Canonical, opaque colorUpper-case #RRGGBB, such as #FF8800
Canonical, any other colorUpper-case #RRGGBBAA, such as #FF880080

Input is case-insensitive, and the # is required.

The value is stored as four bytes. The type default is transparent black, #00000000.

HDR (channels above 1) is not supported. A baked color is clamped to 0…1 on Export.

AnimationCurve

The accepted input is key,key,…[|pre:post]. A key has 2, 4, 7 or 8 fields. Keys of 3, 5 and 6 fields are errors.

FieldsKey formEffect
2t:vTakes the slope to its neighbors as tangents (Linear/Linear)
4t:v:in:outKeeps your tangents (Free/Free)
7t:v:in:out:inW:outW:wmAdds weights
8t:v:in:out:inW:outW:wm:tmThe complete form

Shorter forms fill in the rest. A 2-field key also gets weights of 0.33333334 and no weighting.

Canonical curve form

The canonical form writes every key in the 8-field form, joined with ,. The |pre:post wrap suffix is written only when either end is not ClampForever.

This is a canonical two-key curve: 0:0:1:1:0.33333334:0.33333334:0:Linear/Linear,1:1:1:1:0.33333334:0.33333334:0:Linear/Linear.

Weighting and tangent mode

wm is the weighted-tangent flag.

wmWeighted side
0None
1In
2Out
3Both

tm is the tangent mode pair Left/Right, optionally followed by /broken. Each side is one of Free, Auto, Linear, Constant, ClampedAuto. Unity's curve editor uses the same names.

Tangents recomputed from the mode

For any side that is not Free, the tangent value is recomputed from the mode at import time. Unity performs the same computation.

A hand-typed number that contradicts its mode is replaced. The sheet, the editors and the game all show one curve.

Curve key rules

  • Tangent fields may be Infinity or -Infinity, which is a Constant step.
  • Time, value and weight must be finite.
  • Key times must be distinct.
  • There is no limit on the number of keys.

Keys are sorted by time on import, so the order you type them in does not matter.

Wrap modes

Wrap modes are ClampForever, Loop, PingPong and Default.

Once is accepted as an alias for ClampForever. Unity normalizes it, and it is never written back.

Curves with no keys

A curve with no keys has no text form. It exists only as the empty cell of an optional column, and Export renders it as an empty cell.

Gradient

The accepted input is colorKeys[|alphaKeys[|mode[|colorSpace]]]. A gradient takes 1 to 8 color keys and 1 to 8 alpha keys.

SectionNotation
Color keys#RRGGBB[@t] (or #RGB)
Alpha keysa[@t]
ModeBlend, Fixed (steps) or PerceptualBlend
Color spaceGamma or Linear, optional

A missing alpha section means 1@0,1@1. A missing mode means Blend.

The color space only changes how PerceptualBlend interpolates.

Canonical gradient form

The canonical form has three sections, with keys in time order: #FF0000@0,#0000FF@1|1@0,1@1|Blend.

A fourth section, |Gamma or |Linear, is written only when a color space was set.

Gradient key rules

Color keys carry no alpha. #RRGGBBAA in the color section is an error, because alpha has its own section.

Within a section, the @t times are either all present or all absent. When they are absent, the keys are spread evenly.

Keys in the sectionTime of each key
n = 10
n ≥ 2i/(n−1)

Times and alphas are 0…1. Times are quantized to 16 bits on import, exactly as Unity stores them. The value you see is the value the engine holds.

Single-key gradients

A gradient with a single key round-trips through Unity as two identical keys. The picture is unchanged. Only the key count grows.

Editors

The Data Studio shows these cells as previews that open color, curve and gradient editors, the same editors as the web app. See Color, curve and gradient cells.

The web app shows them as previews with full editors. See Visual values.

Both write the canonical form. The minimal forms are for people.

Next steps