public void ApplyTheme(string colorName, ThemeColor target) { if (TryGetColor(colorName, out Color color)) { ApplyColor(target, color); } }
private static void ApplyColor(ThemeColor target, Color color) { var graphic = target.GetComponent <Graphic>(); if (graphic == null) { Log.w("Passed target graphic was null!"); return; } graphic.color = color; }