Better Trade Colors [Performance]
Better Trade Colors Instantly parse your inventory at a glance.
Better Trade Colors
Instantly parse your inventory at a glance. Better Trade Colors adds intelligent, global color-coding to item labels based on quality, durability, and condition.
Designed from the ground up for modern performance, this mod replaces heavy string manipulation and dynamic regex parsing with a lean, array-indexed color-tag pipeline. The result is faster, cleaner item labeling when scrolling through large late-game trade lists.
🎨 What is colored?
Quality: An intuitive color spectrum from greyscale for Awful items to cyan for Legendary items.
Condition: Items below 50% durability are highlighted in vibrant magenta.
Tainted: Stripped apparel is marked in dim red/brown to help prevent accidental sales.
⚙️ Why choose this mod?
Benchmark Tested: In my Dubs Performance Analyzer benchmarks, Better Trade Colors measured more than 60% faster than Quality Colors in average UI CPU time during active trade UI testing. Benchmark screenshots are included in the gallery.
Low-Allocation Architecture: Replaces the legacy approach of repeated string stripping and layered patching with 2 focused Harmony patches. Rich-text tags are cached and reused through direct array indexing to reduce avoidable allocations and frame-time spikes.
Smart Parsing: Uses cache-aware text truncation to help prevent UI clipping.
Stack-Aware: Item names are colored, but quantities such as "x75" remain standard text, keeping sorting, counting, and calculation mods easier to read and less likely to conflict.
Safe to Add or Remove: This mod only changes item label display and does not add save data.
🤝 Compatibility
Works with LWM's Deep Storage, Trade UI Revised, RimHUD, and many others.
Load Order: Place anywhere in the UI section. If you use multiple item-label or trade-window mods, place Better Trade Colors near those mods.
🔗 Links
Source Code: https://github.com/JoyfulReaper/BetterTradeColors
License: BSD 2-Clause
Development Disclosure: Built by an experienced C# developer. AI tools were used for drafting, refactoring, and documentation assistance, but the design, code review, testing, debugging, release decisions, and maintenance are mine. Harmony patches and gameplay changes are reviewed against RimWorld/Verse behavior before release.