Skip to main content
Documentation

Data Types

Understanding the data types used in Spectralite nodes

Data Types

Nodes in Spectralite work with different types of data. Understanding these types helps you build effective effects.

Core Types

Number

The most common type. A single numeric value.

Range: Any real number (typically 0-1 for normalized values)

Uses:

  • Intensity/brightness
  • Animation progress
  • Mathematical calculations
  • Single channel control

Color on ports: Gray

Color

An RGB or RGBW color value.

Format: Four components - Red, Green, Blue, (White)

Range: Each component 0-255

Uses:

  • Fixture color output
  • Color mixing
  • Gradients

Color on ports: Blue

Vector

A multi-component value, typically 2D or 3D coordinates.

Format:

  • Vec2: (X, Y)
  • Vec3: (X, Y, Z)
  • Vec4: (X, Y, Z, W)

Uses:

  • Position in pixel maps
  • UV coordinates
  • Direction vectors

Color on ports: Purple

Boolean

True or false value.

Values: true (1) or false (0)

Uses:

  • Conditions
  • Toggles
  • On/off states

Color on ports: Green

Special Types

ColorMap

A gradient or lookup table of colors.

Uses:

  • Map values to color ranges
  • Create palettes
  • Gradient effects

Curve

An easing curve or bezier path.

Uses:

  • Animation timing
  • Value remapping
  • Custom response curves

Type Conversion

Automatic Conversion

Some conversions happen automatically:

  • Number → Boolean (0 = false, non-zero = true)
  • Boolean → Number (false = 0, true = 1)

Explicit Conversion

Use conversion nodes for:

  • Color ↔ Vector (RGB as XYZ)
  • Number → Vector (same value for all components)
  • Vector → Number (extract component)

Type Compatibility

Connection Rules

Ports can only connect when types match or convert:

FromToAllowed
NumberNumberYes
NumberColorNo (use conversion)
VectorNumberNo (extract component)
ColorVectorYes (RGB as XYZ)
BooleanNumberYes (automatic)

Invalid Connections

When you try to connect incompatible types:

  • Connection won't complete
  • Tooltip shows the issue
  • Use a conversion node

Working with Types

Inspecting Types

To see a port's type:

  • Hover over the port
  • Check the port color
  • Look at the tooltip

Type Errors

If a node shows an error:

  1. Check input types
  2. Add conversion nodes if needed
  3. Verify connections are valid

Normalized Values

Many effects work best with normalized values (0-1 range):

Why Normalize?

  • Consistent behavior across nodes
  • Easy to blend and mix
  • Works with any output range

How to Normalize

Use these nodes:

  • Remap - Scale any range to 0-1
  • Clamp - Limit to 0-1
  • Fract - Keep decimal part only

Best Practices

Type Consistency

Keep data types consistent through your graph:

  • Start with the right input type
  • Convert early if needed
  • Avoid unnecessary conversions

Performance

Type conversions have minimal cost, but:

  • Use the most direct path
  • Avoid converting back and forth
  • Let automatic conversions work