diff --git a/Darling/Darling.Tests/Viewer4578Tests.cs b/Darling/Darling.Tests/Viewer4578Tests.cs
new file mode 100644
index 0000000000..0f811054c3
--- /dev/null
+++ b/Darling/Darling.Tests/Viewer4578Tests.cs
@@ -0,0 +1,103 @@
+using System;
+using System.Collections.Generic;
+using PerformanceMonitor.Common;
+using Xunit;
+
+namespace Darling.Tests;
+
+///
+/// #4578: the wait-category chart colours port PerformanceStudio dev's contrast-checked palette
+/// (erikdarlingdata/PerformanceStudio@161785f) into byte for
+/// byte. Golden pin on every category's hex, plus a WCAG contrast pin against the dark chart
+/// background PS measured against.
+///
+public class Viewer4578Tests
+{
+ // PS DarkTheme.axaml's WaitCategory.* brushes at 161785f (unchanged through PS dev 85492a1).
+ private static readonly Dictionary ExpectedDarkHex =
+ new(StringComparer.OrdinalIgnoreCase)
+ {
+ ["Unknown"] = "#9CA1A5",
+ ["CPU"] = "#3EBD50",
+ ["Worker Thread"] = "#72E1A9",
+ ["Lock"] = "#FB6640",
+ ["Latch"] = "#FEB5ED",
+ ["Buffer Latch"] = "#E8469D",
+ ["Buffer IO"] = "#238CFA",
+ ["Compilation"] = "#A1A3FB",
+ ["SQL CLR"] = "#63C5C6",
+ ["Mirroring"] = "#30907E",
+ ["Transaction"] = "#DB9027",
+ ["Preemptive"] = "#FFA8C0",
+ ["Service Broker"] = "#FF9289",
+ ["Tran Log IO"] = "#8AC6FF",
+ ["Network IO"] = "#BBE2FE",
+ ["Parallelism"] = "#9A84FE",
+ ["Memory"] = "#FFE6B1",
+ ["Tracing"] = "#BDC8CE",
+ ["Full Text Search"] = "#D8F2FC",
+ ["Other Disk IO"] = "#0FB3E2",
+ ["Replication"] = "#5DF9ED",
+ ["Log Rate Governor"] = "#FFCACA",
+ ["Others"] = "#676E73",
+ // PM-ahead: PS's ~161785f diff shows no "Batch Mode" category (PM classifies batch-mode
+ // hash/bitmap waits separately; PS folds them elsewhere). Not part of the port, kept as-is.
+ };
+
+ // PS's plan-viewer background brush (BackgroundBrush, DarkTheme.axaml) that PS measured
+ // 3:1 contrast against when laying the palette out.
+ private const string DarkChartBackground = "#1A1D23";
+
+ [Theory]
+ [MemberData(nameof(CategoryNames))]
+ public void WaitColor_MatchesPerformanceStudioDarkPalette(string category)
+ {
+ var expected = ExpectedDarkHex[category];
+ var actual = ChartPalette.WaitColor(category, lightBackground: false);
+
+ Assert.Equal(expected, actual, ignoreCase: true);
+ }
+
+ [Theory]
+ [MemberData(nameof(CategoryNames))]
+ public void WaitColor_ClearsWcagContrastFloorAgainstDarkChartBackground(string category)
+ {
+ var hex = ChartPalette.WaitColor(category, lightBackground: false);
+
+ var ratio = ContrastRatio(hex, DarkChartBackground);
+
+ Assert.True(ratio >= 3.0, $"{category} = {hex} contrast {ratio:F2} against {DarkChartBackground}, below the 3:1 floor");
+ }
+
+ public static IEnumerable