Studio Yotsuba
Back to Node List

Procedural Palette

procedural_palette

Builds a palette from base colors, variables, and OKLCH-derived slots.

Reviewed
Guide available

Output Ports

NameTypeDescription
Palette
palette
Palette
Resolved palette generated from the recipe.
Recipe
recipe
ProceduralPaletteRecipe
Procedural palette recipe data for future recipe nodes.

Parameters

NameTypeDefaultRangeDescription / Options
Recipe Data
recipe_data
CustomData
{"version":1,"variables":[{"id":"shadow_l_1","name":"Shadow L 1","comment":"影色を少し暗くします。","kind":"oklch_l","paramId":"variable_1","value":-12.0,"min":-50.0,"max":50.0,"step":0.1,"distribution":null},{"id":"shadow_l_2","name":"Shadow L 2","comment":"さらに暗い影色を作ります。","kind":"oklch_l","paramId":"variable_2","value":-24.0,"min":-50.0,"max":50.0,"step":0.1,"distribution":null}],"slots":[{"kind":"empty","index":0,"name":"Empty"},{"kind":"manual","index":1,"name":"Base Red","color":[0.9,0.18,0.28,1.0],"lightness_expression":"","chroma_expression":"","hue_expression":"","alpha_expression":"","variable_links":[]},{"kind":"oklchAdjust","index":2,"name":"Red Shadow 1","source":1,"lightness":0.0,"chroma":0.0,"hue":0.0,"alpha":0.0,"lightness_expression":"","chroma_expression":"","hue_expression":"","alpha_expression":"","variable_links":["shadow_l_1"]},{"kind":"oklchAdjust","index":3,"name":"Red Shadow 2","source":1,"lightness":0.0,"chroma":0.0,"hue":0.0,"alpha":0.0,"lightness_expression":"","chroma_expression":"","hue_expression":"","alpha_expression":"","variable_links":["shadow_l_2"]},{"kind":"manual","index":4,"name":"Base Blue","color":[0.2,0.38,0.95,1.0],"lightness_expression":"","chroma_expression":"","hue_expression":"","alpha_expression":"","variable_links":[]},{"kind":"oklchAdjust","index":5,"name":"Blue Shadow 1","source":4,"lightness":0.0,"chroma":0.0,"hue":0.0,"alpha":0.0,"lightness_expression":"","chroma_expression":"","hue_expression":"","alpha_expression":"","variable_links":["shadow_l_1"]},{"kind":"oklchAdjust","index":6,"name":"Blue Shadow 2","source":4,"lightness":0.0,"chroma":0.0,"hue":0.0,"alpha":0.0,"lightness_expression":"","chroma_expression":"","hue_expression":"","alpha_expression":"","variable_links":["shadow_l_2"]}],"slotOrder":[]}—

Procedural palette recipe stored as JSON.

Variable 1
variable_1
Float
-12-100–100 / step 0.01

Variable value used by recipe expressions. Promote it to animate palette rules.

Variable 2
variable_2
Float
-24-100–100 / step 0.01

Variable value used by recipe expressions. Promote it to animate palette rules.

Variable 3
variable_3
Float
0-100–100 / step 0.01

Variable value used by recipe expressions. Promote it to animate palette rules.

Variable 4
variable_4
Float
0-100–100 / step 0.01

Variable value used by recipe expressions. Promote it to animate palette rules.

Variable 5
variable_5
Float
0-100–100 / step 0.01

Variable value used by recipe expressions. Promote it to animate palette rules.

Variable 6
variable_6
Float
0-100–100 / step 0.01

Variable value used by recipe expressions. Promote it to animate palette rules.

Variable 7
variable_7
Float
0-100–100 / step 0.01

Variable value used by recipe expressions. Promote it to animate palette rules.

Variable 8
variable_8
Float
0-100–100 / step 0.01

Variable value used by recipe expressions. Promote it to animate palette rules.

Editor Width
_editor_width
Int
840520–1800

Procedural palette editor width.

Editor Height
_editor_height
Int
620360–1400

Procedural palette editor height.

  • type_id: procedural_palette
  • category: Palette/Create
  • editor: ProceduralPaletteEditor

Overview

Creates a linked palette defined by base colors and derivation rules. A shadow color can use a rule such as “base color lightness −12,” so changing one base color updates every shadow and highlight. Think of it as a node-based blueprint for a color scheme.

Usage tips

  • Unlike a manual palette_create, which is a list of colors, this node defines relationships between colors. It excels at repeated structures such as a character palette with a base color plus two shadow levels.
  • Share a variable such as shadow_l_1 across all colors to control the depth of every shadow with one value.
  • Save a mature recipe as a common asset and reference it from other projects with procedural_palette_ref.

Related nodes

  • procedural_palette_ref — references a recipe saved as a common asset
  • palette_create — manual list-of-colors version
  • indexed_image_apply_palette / indexed_image_render — apply the output palette
  • palette_adjust_oklch — temporary adjustment without a recipe

Purpose

This node creates a palette whose colors change together based on base colors and variables.

For example, variables for shadow colors can adjust a set containing a red base, red shadow 1, red shadow 2, blue base, blue shadow 1, and blue shadow 2 together.

The main output is a regular Palette. Connect it directly to existing palette inputs such as IndexedImage Render or IndexedImage Apply Palette; no special image processing is required.

Understanding recipes

A recipe has two main elements.

Element Role
Variable A numeric value referenced by multiple slots, for example shadow_l_1 = -12
Slot A palette index defined as either a manual or derived color

Slots support the following types.

Type Description
Manual color Assigns a color directly to that index
OKLCH-derived Starts from the color at another index and offsets L / C / H / A in OKLCH space

Expressions support the following syntax.

Syntax Meaning
-12 Use the number directly
$shadow_l_1 Reference the shadow_l_1 variable
var:shadow_l_1 Same as above

For an OKLCH-derived color, L is measured in percentage points. A value of -12 reduces OKLCH lightness by 12 points relative to the source color.

How to use

  1. Add Procedural Palette.
  2. Open its editor.
  3. Create a base color as a Manual Color.
  4. Create shadow and highlight colors as OKLCH-derived colors.
  5. Enter a variable such as $shadow_l_1 for L.
  6. Connect the palette output to IndexedImage Render or another consumer.
  7. Move the variable slider and review the color change in the connected image.

Variable parameters

This node has Float parameters from variable_1 through variable_8.

Variables in the dedicated editor can be bound to these parameters. Promote a parameter to an input pin to control shadow strength or another value dynamically from a waveform or numeric node.

v1 limitations

  • Recipes do not yet accept external inputs.
  • The dedicated recipe type is output-only.
  • OKLCH adjustment is the initial derivation method.
  • For now, use variables and slot editing in the dedicated editor rather than an advanced graph-style expression editor.

This design allows future features such as recipe composition, slot-range generation, and automatic generation from a color wheel without changing existing Palette consumer nodes.

Back to Node List