Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

studio(ui): use the --primary brand token for the avatar fallback color (#5987)

Daniel Hanfcfbf166ff0e
diff --git a/studio/frontend/src/features/profile/utils/avatar-initials.ts b/studio/frontend/src/features/profile/utils/avatar-initials.ts
index 254a50719bb..2683b52a37d 100644
--- a/studio/frontend/src/features/profile/utils/avatar-initials.ts
+++ b/studio/frontend/src/features/profile/utils/avatar-initials.ts
@@ -7,7 +7,19 @@ export function initialsFromName(name: string): string {
return trimmed[0]!.toUpperCase();
}
-/** Default Unsloth-green background for avatar fallback (readable white text). */
+/**
+ * Default Unsloth-brand background for the avatar fallback (readable white text).
+ *
+ * Uses the shared `--primary` design token instead of a one-off hardcoded
+ * shade, so the avatar always matches the app's general brand green (send
+ * button, primary buttons, etc.). It previously hardcoded a slightly different
+ * `#14b789`, which looked inconsistent next to primary-colored UI such as the
+ * artifact preview/code panel.
+ *
+ * The literal fallback (the current `--primary` value) only applies if this
+ * reusable avatar is ever rendered outside the theme root, where `--primary`
+ * is undefined -- it keeps the avatar branded instead of transparent.
+ */
export function avatarBgStyle(): { backgroundColor: string } {
- return { backgroundColor: "#14b789" };
+ return { backgroundColor: "var(--primary, #17b88b)" };
}