Color Replacer — Documentation

Find & replace colors across scenes, prefabs, and materials with tolerance-based grouping, palette, Dry‑Run preview, CSV reports, and safe Undo.

Overview

Color Replacer scans open scenes, the current selection, project prefabs and materials, grouping all discovered Color values by similarity (tolerance). Replace entire groups at once or tweak items individually. Supports UI components, renderers, lights, cameras, particle systems (Color mode), and shader color properties.

Tolerance-based groups Alpha matching Scene / Selection / Prefabs / Materials Shader color properties Dry‑Run preview CSV reports Undo‑safe Palette

Install

Folder & Menu

  • Open via Tools → Color Replacer.
  • Hotkey: Ctrl/Cmd + Shift + Y.

Requirements

  • Unity 2019.1+ uses Shader.GetProperty* API.
  • Older Unity auto‑fallbacks to ShaderUtil.*.
  • TextMeshPro recommended for TMP color fields (optional).

Quickstart

Choose scope in Scope & Matching: Open Scenes / Selection / Project Prefabs / Project Materials.
Scan with Scan / Refresh. Use Name Filter, Include Inactive, and toggle Known Types First for speed.
Select groups on the left. On the right, review items or tweak individual colors.
Set New Color (or pick from Palette). Click Apply Replace or Preview (Dry Run).
Optionally export a CSV report for audit.

UI Guide

Toolbar

  • Scan / Refresh — run a new scan.
  • Dry Run — simulate replacements without writing.
  • Compact — denser items list.
  • Report — show save‑dialog after apply to export CSV.
  • Search bar — filter by hex, context name, property, or asset name.

Scope & Matching

  • Scopes: Open Scenes, Selection Only, Project Prefabs, Project Materials.
  • Include Inactive — include disabled objects.
  • Tolerance — widen/narrow color grouping.
  • Match Alpha — include alpha in grouping.
  • Name Filter — partial match on object/material names.

Renderer Handling

  • Instance material (renderer.material) — affects instances, marks scene dirty.
  • Shared material (renderer.sharedMaterial) — modifies the material asset.
Prefer Instance while testing. Switch to Shared when you are sure.

Groups & Items

  • Left: color groups with counts, select/deselect quickly.
  • Right: per‑item details — context, property, path, inline color editor.
  • Palette: store and reuse your brand colors.

Supported Types

CategoryComponents / Notes
UIImage, RawImage, Text, TextMeshProUGUI
2D/FXSpriteRenderer, LineRenderer (start/end), TrailRenderer (start/end)
LightingLight.color
CameraCamera.backgroundColor
ParticlesParticleSystem.Main.startColor (Color mode only)
RenderersMaterial & Shared Material color properties
OtherFallback reflection for Color fields/properties
Grouping uses a tolerance slider and optional alpha‑matching. Close colors merge into a single group for bulk replace.

Shader Materials

Materials are scanned using modern shader property API when available:

shader.GetPropertyCount();
shader.GetPropertyType(index) == ShaderPropertyType.Color;
var name = shader.GetPropertyName(index);
mat.GetColor(name) / mat.SetColor(name, value);
Legacy Unity versions automatically fall back to ShaderUtil.* so older projects remain supported.
Note: Some shaders expose colors conditionally via keywords. If a property is inactive, it may not be discovered.

Safety, Undo & Saving

Undo‑Safe

All changes are recorded in a single Undo group: one step to revert.

Auto Save (Optional)

Enable Auto Save Scenes / Auto Save Assets to persist results immediately.

Dry‑Run

Preview replacements without writing, then apply with confidence.

Performance Tips

  • Limit scope (e.g., Selection Only) when iterating quickly.
  • Use Known Types First to skip reflection and speed up scans.
  • Filter by Name to reduce search set.
  • Prefer Instance material while testing replacements.

FAQ

Particles didn’t change?

Only Color mode of Main.startColor is supported. Gradients are intentionally not modified.

URP/HDRP support?

Yes. Any shader exposing Color properties via the property API is scanned.

Can I revert?

Absolutely. Press Ctrl/Cmd + Z. All operations are grouped under one Undo entry.

Does it change shared assets?

Only if you enable Shared material. Otherwise, instance materials are affected.

Changelog

  • 2.0.0 — Migrated to Shader.GetProperty* API with legacy fallback; UI polish and documentation update.
  • 1.0.0 — Initial Pro release: scopes, tolerance grouping, palette, Dry‑Run, CSV, Undo, auto‑save, shader color support.

Support

Questions or issues? Reach out: