Lyra 2.1
This model takes a single color in OKLab color space as input and generates a palette of 9 harmonious colors by predicting color offsets.
Input Specification
| Property | Value |
|---|
| Type | Float32 |
| Shape | ℝ³ |
Shape :
Julia ( Lux ) : (3, 1)
PyTorch : (1, 3) or (N, 3)
Format :
Channels :
| Channel | Description |
|---|
| L | Lightness |
| a | Green–Red axis |
| b | Blue–Yellow axis |
Output Specification
| Property | Value |
|---|
| Type | Float32 |
| Shape | ℝ^(9×3) |
Note : (3, 9) is equivalent to (9, 3) or flattened (27,) depending on the framework.
Shape :
Julia ( Lux ) : (3, 9)
PyTorch : (N, 27) => reshaped to (N, 9, 3)
Format :
Δ = [ δ₁ δ₂ ... δ₉ ]
where each δᵢ ∈ ℝ³
Each column δᵢ represents a predicted color offset in OKLab space.
Post-processing
The final palette is obtained by adding the input color to each predicted offset :
General form :
Y = X + Δ
Where :
| Symbol | Description |
|---|
| X ∈ ℝ³ | Input color |
| Δ ∈ ℝ^(9×3) | Predicted offsets |
| Y ∈ ℝ^(9×3) | Final palette colors |
( Actual tensor layout depends on the framework implementation. )
Example implementations :
Julia : Y = Δ .+ repeat(X, 9)
PyTorch : Y = X.repeat(1, 9) + Δ
Final Output
| Property | Value |
|---|
| Shape | ℝ^(9×3) |
| Color space | OKLab |
Each color yᵢ ∈ ℝ³ is represented in OKLab space :
Y = [ y₁ y₂ ... y₉ ], yᵢ ∈ ℝ³
The result is a palette of 9 colors, each expressed as [L, a, b]ᵀ.