HueForge Studio
A non-destructive palette & texture recoloring studio for Unity. Extract palettes, recolor by color group, paint solid / gradient / pattern fills, stack injection layers, repair and quantize textures, and batch-recolor entire projects — all from one docked editor window. Works fully offline; optional AI palette / texture generation uses your own API key.
⚡ Quick Start
From a raw texture to a recolored result in under a minute.
🌈 Palette tab
Harmony generation, WCAG contrast audit, and import/export in one place.
🎮 Color Groups
Union-find grouping, pixel parenting, GPU Voronoi, tiered auto-clean.
🤖 AI Generation
Claude / OpenAI palettes and HTTP / Replicate texture generation — your key.
♿ Accessibility
WCAG contrast report plus a colour-blindness preview, built in.
💻 Headless CI
Batch-mode palette-signature verification and recipe replay for pipelines.
This guide is organised as Getting Started, a Workspace tour of every tab, deep-dives under Features, and a Reference section with asset types, the scripting API, troubleshooting, and FAQ.
New in 2.0 — an all-in-one colour toolset
Version 2.0 folds a whole product family into one asset (all reachable from the Palette tab and the Tools ▸ HueForge Studio menu):
🔍 Grab Palette
Extract a palette from any Texture / Sprite / Material / multi-selection (unique-frequency or K-means, merge near-duplicates).
🎨 HD Recolor
Detail-preserving HSV recolor of full-detail / PBR textures — highlights & shading survive. Saves a new texture.
🎲 Sprite Palette Swap
Crisp 1:1 pixel-art palette swap onto a target palette (alpha-safe). Instant recolour variants.
🧩 Palette Optimize
Fuse low-poly models into ONE shared lossless palette texture + material + fused prefabs — batching, fewer draw calls, smaller builds. Non-destructive.
🖌 Perceptual matching
CIELAB ΔE colour distance picks the colour a human calls "nearest", not just the numerically closest.
Assets/HueForgeStudio/Generated/ — your source assets are never modified.Installation
Import the package and open the window. There is nothing to activate.
From the Unity Asset Store
In Unity 2021.3 LTS or newer (developed and tested on Unity 6000.0), open
Window → Package Manager and switch the dropdown to My Assets.Find HueForge Studio, click Download then Import. Accept the import dialog with everything checked. The package lands at
Assets/HueForgeStudio/.Unity compiles the editor scripts. The first import takes a little longer while shaders and assemblies build.
Tools → HueForge Studio → Open Window, or press Alt+Shift+H.What gets installed
Assets/HueForgeStudio/
Runtime/ // pipeline-agnostic types, palette/pattern assets, colour math
Editor/ // the window, tabs, operations, workers, IO, AI, CLI
Window/Tabs/ // Paint, Palette, Inject, Repair, Batch, History, Settings, Help
Operations/ // one class per non-destructive edit, history-aware
Compute/ // System.Math workers (background-thread safe)
Gpu/ // GPU Voronoi coagulation
AI/ // Claude / OpenAI / HTTP / Replicate providers
CLI/ // headless batch + verify entry points
Shaders/ // preview blit shaders for BiRP / URP / HDRP + Voronoi
Palettes/ // default output dir for palettes you create / import
Documentation/ // you are hereProject
Assets/HueForgeStudio/Generated/ and Assets/HueForgeStudio/Palettes/ when you apply an action. HueForge never modifies a source asset until you click apply.Quick Start
Your first non-destructive recolor.
Tools → HueForge Studio → Open Window (or Alt+Shift+H).Drag a Texture, Material, Sprite, GameObject, or Prefab onto the preview frame. HueForge resolves it to the main texture automatically.
Open the Color Groups panel and click
Group Palette. Drag the Similarity slider to coarsen or refine groups.Click a group swatch to make it the active colour. Define a region by Shift-dragging the preview, or type X / Y / W / H.
Click
Apply Solid and watch the SceneView update live. Try Gradient or Pattern mode for richer fills.Press
Ctrl+Z or use the Undo / Redo / Reset buttons in the toolbar — HueForge keeps file-backed snapshots so you can always get back to the original.Requirements
What HueForge needs from your project.
| Requirement | Detail |
|---|---|
| Unity version | 2021.3 LTS or newer. Developed and verified on Unity 6000.0. |
| Render pipeline | Built-in, URP, or HDRP — auto-detected via PipelineProbe. See Render Pipelines. |
| Texture readability | HueForge handles read/write through editor asset I/O. Imported PNG/JPG writeback is supported; native .asset textures use Unity undo. |
| GPU compute (optional) | Voronoi coagulation uses a compute shader. If the platform lacks compute support, other grouping methods still work. |
| AI features (optional) | Internet + your own API key (Anthropic / OpenAI) or HTTP image endpoint. Not required for any core feature. |
Paint Tab
Solid, gradient, and pattern fills over a texture region, plus the Color Groups workbench.
Three paint modes
Fill the selected region with the active colour. The cleanest way to swap a single group's colour everywhere it appears.
Blend a multi-stop gradient across the region horizontally or vertically. Convert solids to gradients in place.
Stamp a texture or PatternAsset with tiling, rotation, offset, tileable wrap, and opacity — or generate one procedurally.
Region selection
Shift-drag on the preview to draw a rectangular region, or type explicit X / Y / W / H values. Zero-size clicks expand to the current brush size so a single click still paints. An eyedropper (I) samples a colour from the preview.
Emission & metallic companions
Solid, gradient, and pattern fills each have emission and metallic/smoothness variants that write to the matching companion map (e.g. _EmissionMap, _MetallicGlossMap) resolved for the active render pipeline.
On the same tab
- Color Groups workbench — group, parent orphans, coagulate, auto-clean, sort, diffuse. See Color Groups & Cleanup.
- A/B preview split-slider with BEFORE / AFTER labels.
- Colour-blindness simulator overlay (Protanopia / Deuteranopia / Tritanopia).
- Paint presets — save and reload mode + region + colour + gradient/pattern settings as a
HueForgePaintPreset.
PaletteAsset (or a .gpl / .ase / .png palette file) straight onto the window to load it into the Color Groups panel.Palette Tab
A dedicated palette workspace: generate, audit, and exchange palettes inline.
The Palette tab (second tab, right after Paint) unifies three palette-centric tools. The same actions are also available as standalone wizards under the Tools menu.
Pick a base colour and a colour-wheel scheme, choose how many swatches you want, and watch the live preview. Click Generate & Save Palette to write a
PaletteAsset — it flows straight into the report and export fields below. See Colour Harmony.Assign a palette to see per-swatch text readability (contrast on white / black, recommended text colour, AA/AAA badge) and a list of any colour pairs too low-contrast to sit side by side. See Accessibility.
Import
.gpl / .ase / .png / hex lists into a PaletteAsset, or export any palette to GPL, ASE, PNG strip, hex/CSS list, or JSON. See Import / Export.Inject Tab
Composite multiple textures into a region with blend modes.
Build a stack of injection layers — each layer is a source texture with a blend mode, opacity, and optional mask. Reorder layers, toggle them, and flatten the stack to a single result that writes back to the target. The layer setup is stored on a HueForgePreset so you can reuse a compositing recipe across assets.
Repair Tab
Clean up and constrain texture data.
| Operation | What it does |
|---|---|
| Posterize | Reduce each channel to N levels for a flat, banded look. |
| Quantize (K-means) | Cluster the region's colours into K representative colours. |
| Remove Anti-Aliasing | Collapse soft edge pixels whose local variance is below a threshold — crisp pixel-art edges. |
| Snap to Palette | Map every pixel to the nearest colour in a PaletteAsset (or a colour list). |
| Channel Clamp | Clamp R / G / B / A each to a min–max range. |
Repair settings can be saved as a HueForgeRepairPreset and replayed via recipes or batch.
Batch Tab
Apply one preset to many assets, with a dry run and a revertable report.
A
HueForgeBatchWorkPreset picks exactly one mode — Paint, Inject, or Repair — and references one matching preset.Add selected textures, or use the project-wide material search (with a shader column and an "Add matching textures" queue) to gather everything that shares a palette signature.
See exactly which assets would change before anything is written.
HueForge writes the changes and emits a CSV + JSON report of every asset touched.
Revert the latest batch (or a named batch) from the report — the file-backed snapshots make it reversible.
History & Undo
Per-asset operation log with real undo, redo, and reset.
Every operation is recorded with a thumbnail. HueForge keeps file-backed snapshots under the project Library/ (original, before, after) plus a persistent history cursor, so undo / redo / reset work even for imported PNG/JPG writeback — not just native texture assets.
- Undo / Redo / Reset from the window toolbar;
Ctrl+Z/Ctrl+Ybridge into HueForge history where possible. - Reset restores the very first state HueForge captured for the active target.
- List or thumbnail-grid view of the snapshot history.
- Recipe capture — turn the last N history steps into a replayable
HueForgeRecipe. See Recipes.
Library/, which is local and not normally version-controlled. If you delete Library/, older file-backed undo/reset snapshots are gone (your applied edits remain on the assets).Settings Tab
Per-project defaults and optional AI provider configuration.
| Setting | Description |
|---|---|
| Default palette directory | Where new PaletteAssets are created. Must be inside Assets/. |
| AI palette provider | Pick Claude or OpenAI as the active palette generator. |
| Anthropic / OpenAI API key | Your own key. Stored in EditorPrefs under the HueForge.AI.* namespace — never serialized into a scene or asset. |
| Claude / OpenAI model | Defaults: claude-sonnet-4-6 and gpt-4o-mini. |
| HTTP image endpoint | URL + optional header for texture generation (raw PNG or auto1111-style base64 responses). |
| Replicate token / model | Optional Replicate texture generation. |
| Analyzer strictness | When strict, dead-pref-key warnings escalate to errors so CI can fail the build. |
Recolor & Grab
The all-in-one colour toolset: pull palettes from anything, recolor HD textures and sprites, and stylise — all non-destructive (a new asset is written; your source is never touched). Each tool is a one-click wizard under Tools ▸ HueForge Studio.
PaletteAsset.PaletteAsset: crisp 1:1 by frequency for pixel art, or flip on Perceptual matching (CIE76 / CIEDE2000) for anti-aliased and photographic sprites where the numerically-closest colour isn't the visual match. Alpha preserved.Color Groups & Cleanup
Turn a noisy texture into a small, editable palette of groups.
HueForge indexes a texture's unique colours and folds similar ones into groups. Recoloring a group recolors every pixel that belongs to it — one swap, many pixels. The workbench tools:
| Tool | What it does |
|---|---|
| Group Palette | Union-find grouping with path compression; each group gets a pixel-weighted representative colour. The Similarity slider sets the merge threshold. |
| Pixel Parenting | Reassigns orphan / anti-aliased pixels to a nearby group via iterative BFS, in NeighborFrequency or ColorDelta mode. |
| Coagulate Regions | GPU Voronoi coagulation (async AsyncGPUReadback, up to 4096 seeds) clusters scattered spots into coherent regions without freezing the editor. |
| Auto-Clean | Four tiers of speckle removal: FrequencyClip, FrequencyVariance, FrequencyVoronoiGrid, FrequencyRatio. |
| Diffusion Blend | Bleed one colour toward another within a tolerance, on a Linear or Exponential curve. |
| Palette Sort | Sort groups by hue-from-anchor or by pixel frequency. |
| Extract Palette | K-means quantize any source image into a saved PaletteAsset. |
Gradients & Patterns
Richer fills than a flat colour.
Gradients
Define a multi-stop gradient and apply it across a region horizontally or vertically. Solid groups can be converted to gradients and back.
Procedural pattern generators
In Pattern mode, the Generate Procedural Pattern foldout offers thirteen generators that you can snap to the active palette or gradient:
Noise & cells: Perlin, Voronoi, Perlin-Voronoi, Cellular Automata (Conway).
Structured & tiling: Grid, Decorated Grid, Stripe, Bricks, Wood, Checkerboard.
Dots & marks: Dots, Hexagon, Crosshatch.
A generated pattern can be stamped immediately or saved as a PatternAsset (texture + tiling / rotation / offset / tileable / opacity) for reuse.
Colour Harmony
Rule-based palette generation from one base colour — deterministic, offline, free.
Open the Palette tab (or Tools → HueForge Studio → Generate Harmony Palette...), pick a base colour and a scheme, and HueForge builds a palette on the colour wheel. Six schemes:
| Scheme | Result |
|---|---|
| Complementary | Base + the opposite hue (180°). |
| Analogous | Neighbours spaced by an adjustable angle, centred on the base hue. |
| Triadic | Three hues evenly spaced (120° apart). |
| Tetradic | Four hues at quarter-turns (90°). |
| Split-Complementary | Base plus the two hues either side of its complement (150° / 210°). |
| Monochromatic | One hue, a dark→light value ramp. |
The colour math lives in ColorHarmony (runtime, unit-tested). Requesting more colours than a scheme's anchors pads with progressively value-varied repeats, so the count is always honoured and no swatch collapses to black.
// Generate a 5-colour triadic palette from steel blue
Color32[] swatches = ColorHarmony.Generate(
new Color32(70, 130, 180, 255),
ColorHarmony.Scheme.Triadic, count: 5);C#
Accessibility (WCAG)
Audit a palette's contrast before it ships in your UI.
The accessibility report (in the Palette tab, or Tools → HueForge Studio → Palette Accessibility Report...) uses gamma-correct sRGB relative luminance — the same formula accessibility tools use — to compute WCAG 2.1 contrast ratios.
- Per-swatch readability — contrast against white and black text, which to use, and an AA / AAA / Fail badge.
- Low-contrast pairs — colour pairs too close to sit next to each other, with their ratio.
- Summary — minimum and average pairwise contrast across the palette.
- One-click auto-fix — choose an AA (4.5:1) or AAA (7:1) target and Save text-safe copy: every failing swatch is nudged in lightness (hue & saturation preserved) until black or white text passes, written to a new palette so the original is untouched.
PaletteAccessibility.MakeTextSafe(colors, targetRatio)exposes the same fix in script.
var report = PaletteAccessibility.Analyze(colors, lowContrastThreshold: 3.0);
double ratio = PaletteAccessibility.ContrastRatio(fg, bg); // 1..21
var level = PaletteAccessibility.ClassifyText(ratio); // Fail / AA / AAAC#
Pair this with the Paint tab's colour-blindness simulator (Protanopia / Deuteranopia / Tritanopia) to check both contrast and colour-vision deficiency in one workflow.
AI Generation
Optional palette-from-prompt and texture-from-prompt, using your own key.
AI palette from text
In Settings, pick a provider and paste your key. Then in the Color Groups panel, open AI Palette, type a prompt, and click Generate Palette.
| Provider | Default model | Notes |
|---|---|---|
| Anthropic Claude | claude-sonnet-4-6 | Tolerant JSON parsing (handles fenced code blocks, drops invalid hex). |
| OpenAI | gpt-4o-mini | ChatCompletions adapter. |
AI texture from an endpoint
Configure an HTTP image URL (raw PNG bytes or an auto1111-style {"images":["<base64>"]} response) or a Replicate token. Click Generate; the PNG lands in Assets/HueForgeStudio/Generated/ and auto-imports.
Import / Export
Move palettes between HueForge and the rest of your toolchain.
| Format | Import | Export | Notes |
|---|---|---|---|
GIMP .gpl | ✓ | ✓ | Plain-text palette, widely supported. |
Adobe .ase | ✓ | ✓ | Swatch Exchange; exports round-trip through the importer. |
| PNG strip | ✓ | ✓ | One pixel (or cell) per colour. |
| Hex / CSS list | ✓ | ✓ | One #RRGGBB per line; accepts with or without #. |
| JSON | – | ✓ | Palette metadata + per-colour hex and channels. |
Use the Palette tab, or the menu shortcuts Tools → HueForge Studio → Import Palette... and Export Palette....
PaletteIO.ExportAse(palette, "MyPalette.ase");
PaletteIO.ExportJson(palette, "MyPalette.json");
var colors = PaletteIO.ParseHexList(File.ReadAllLines("swatches.txt"));C#
Recipes & Automation
Capture a sequence of edits and replay it on other textures.
In the History tab, click Capture Recent History as Recipe to bundle the last N operations into a HueForgeRecipe ScriptableObject. Drag another texture into the Replay target slot and click Replay Recipe.
Replay dispatches Solid Paint, Gradient, Posterize, Quantize, Snap-to-Palette, Channel Clamp, Remove-AA, Diffusion, Coagulate, Pixel Parenting, and AutoClean steps; steps that need extra context are skipped with a diagnostic rather than guessing.
Presets (paint / repair / batch / recipe) also export and import as deterministic UTF-8 JSON via PresetJsonIO, so they diff cleanly in version control.
Render Pipelines
One asset, three pipelines — detected automatically.
PipelineProbe detects the active pipeline (Built-in, URP, or HDRP) and exposes the canonical shader property names so emission, metallic, and mask-map writes target the right channels. Preview blit shaders ship for all three.
| Pipeline | Main | Emission | Metallic / Mask |
|---|---|---|---|
| Built-in | _MainTex | _EmissionMap | _MetallicGlossMap |
| URP / HDRP | resolved via PipelineProbe | resolved | resolved (incl. mask map) |
Extensions (Plugin Bus)
Add your own tools without forking HueForge.
Implement IHueForgeExtension (id, display name, version). Add the optional IHueForgeTabExtension to contribute a custom tab that renders right alongside the built-in tabs. The ExtensionRegistry discovers implementations automatically via [InitializeOnLoad] — no manual registration.
public sealed class MyTab : IHueForgeTabExtension
{
public string ExtensionId => "yourstudio.mytab";
public string DisplayName => "My Tab";
public string TabLabel => "My Tab";
public System.Version Version => new(1, 0, 0);
public System.Action<EditorWindow> DrawTab => w => { /* your IMGUI */ };
}C#
Headless CLI / CI
Run HueForge from Unity batch mode for pipelines and automation.
Palette-signature verify
Fail a CI build when a texture's palette drifts from a known-good signature. A ready-to-use GitHub Action template ships at Documentation/CI/github-action.yml.
Unity.exe -batchmode -nographics -quit \
-projectPath <PROJECT> \
-executeMethod HueForgeStudio.EditorCli.HueForgeVerifyCli.VerifySignature \
-hueforge-target Assets/.../Sword.png \
-hueforge-expected-signature <hex> \
-hueforge-report Library/HueForgeStudio/VerifyReport.csvShell
| Exit code | Meaning |
|---|---|
0 | Signature matches the expected value. |
2 | Signature mismatch (the texture changed). |
1 | Usage error (missing arguments). |
3 | Target asset not found. |
Batch apply / revert
HueForgeBatchCli.RunBatch() applies a HueForgeBatchWorkPreset to its targets and writes a CSV + JSON report; HueForgeBatchCli.RevertBatch() reverts the most recent (or a named) batch. HueForgeRecipeCli replays a recipe headlessly.
Asset Types
The ScriptableObjects HueForge creates and consumes.
| Type | Stores |
|---|---|
PaletteAsset | An editable colour list plus grid columns/rows; used by snap-to-palette, harmony, accessibility, and import/export. |
PatternAsset | A pattern texture plus tiling, rotation, offset, tileable, and opacity. |
HueForgePaintPreset | Paint mode, region, brush size, solid colour, gradient stops, and pattern settings. |
HueForgeRepairPreset | Repair operation settings (posterize / quantize / remove-AA / snap / channel clamp). |
HueForgePreset | Injection-layer setup and target references for compositing. |
HueForgeBatchWorkPreset | One batch mode (Paint / Inject / Repair) + one referenced preset. |
HueForgeRecipe | A sequence of recorded operations for replay. |
Scripting API
The supported public surface for the 1.x line.
Everything public is documented in Documentation/PublicApi.md. Highlights:
- Runtime (
HueForgeStudio.Runtime):ColorHarmony,PaletteAccessibility,PaletteAsset,PatternAsset,PaletteSignature,PipelineProbe, the preset/recipe types,HueForgeVersion. - Operations (
HueForgeStudio.EditorOperations): onepublic staticclass per edit (paint, gradient, pattern, repair, grouping, parenting, coagulate, auto-clean, diffusion, sort, harmony, extract), each returning a status struct and integrating with history. - IO (
HueForgeStudio.EditorPersistence):PaletteIO(parse/export GPL/ASE/PNG/hex/JSON) andPresetJsonIO; history is exposed viaHueForgeHistoryService(HueForgeStudio.EditorCore). - AI (
HueForgeStudio.EditorAi): provider interfaces + Claude / OpenAI / HTTP / Replicate adapters +PromptServiceConfig. - Extensions:
IHueForgeExtension,IHueForgeTabExtension,ExtensionRegistry.
PublicApi.md is internal and may change without notice. Operation payload structs are nested and may grow; treat their JSON as opaque.Troubleshooting
Common issues and how to resolve them.
The texture didn't change on disk
For imported PNG/JPG files, HueForge writes the selected region back to the source file and re-imports it. If nothing changed, confirm a region is selected (a zero-size click expands to the brush size) and that the file isn't read-only / under source-control lock. Native .asset textures use Unity's object undo instead.
The preview is black
Almost always a render-pipeline interaction with the preview viewport. The edit itself is fine — check the result directly on a material/SceneView. If it persists, confirm the active pipeline matches your project (see Render Pipelines).
"Coagulate Regions" is unavailable or does nothing
Voronoi coagulation needs GPU compute-shader support. On platforms/editors without it, use Group Palette + Pixel Parenting + Auto-Clean instead — they run on the CPU.
AI palette returns nothing / errors
Open Settings and confirm: (1) a provider is selected, (2) the matching API key is filled, (3) you have internet access. The key is yours and is stored locally in EditorPrefs. If the provider returns malformed JSON, the Claude adapter strips code fences and drops invalid hex entries — a totally empty response usually means an auth or quota issue on the provider side.
The SceneView didn't update after painting
HueForge calls a scene repaint after every pixel write. If a custom material caches the texture, toggle the material or re-select the object. No asset re-import is required for the SceneView to refresh.
My rig / model imports look wrong
HueForge edits textures and materials, not skeletons — it doesn't change rigs or meshes. If a material shows the wrong map, confirm the shader's property names are recognised for your pipeline (see Render Pipelines).
FAQ
Quick answers.
Does HueForge need an internet connection?
No — every core feature works offline. Only the optional AI palette/texture generators make network calls, and only to your own provider with your own key.
Is it non-destructive?
Yes. Edits are tracked in HueForge's history with file-backed snapshots (original / before / after) so you can undo, redo, and reset — including for imported PNG/JPG writeback. Source assets are only touched when you apply.
Which render pipelines are supported?
Built-in, URP, and HDRP. The active pipeline is auto-detected and the correct shader properties are resolved for you.
Do AI features cost anything to HueForge?
No. There's no HueForge backend, account, or quota. You pay your AI provider directly for the calls you make with your own key, exactly as their pricing dictates.
Can I script it / run it in CI?
Yes. The operations are a public static API, and there are batch-mode CLI entry points for verify, batch apply/revert, and recipe replay. See Headless CLI / CI and Scripting API.
Will my edits show up in a build?
HueForge is an editor tool that edits assets. Once a texture/material is recolored, it's a normal Unity asset and works in any build target Unity supports.
Can I add my own tools to the window?
Yes — implement IHueForgeTabExtension and your tab appears next to the built-in tabs. See Extensions.
My team has several developers. Licensing?
Per Unity Asset Store policy, each seat that uses the asset needs its own license.
Support
Questions, bugs, ideas — we're glad to help.
Get in Touch
Bug reports, feature requests, and licensing questions — reach out and we'll get back to you.
✉ ragendom@gmail.comWe typically respond within 24–48 hours.
- Check Troubleshooting and the FAQ
- Confirm your Unity version and render pipeline
- For AI issues, verify the key in Settings
- Capture any Console output prefixed
[HueForge]
- Unity version (e.g.
6000.0.62f1) - HueForge Studio version (v2.0.0)
- Render pipeline (Built-in / URP / HDRP)
- Steps to reproduce + Console output
HueForge Studio v2.0.0 · Built for Unity 2021.3+ · Built-in / URP / HDRP
Non-destructive palette & texture recoloring for Unity · Support: ragendom@gmail.com