Design System The visual language behind RheaKit: dark scientific surfaces, semantic status colors, and the GlassCard shell.
RheaKit's visual language is defined in RheaTheme: one set of tokens for background, emphasis, operational state, and severity. It is deliberately dark-first and data-forward.
Token Value Usage bgrgb(15, 15, 26)Primary background cardrgb(26, 26, 41)Panel surface cardBorderwhite @ 6%Subtle panel outline accentrgb(102, 217, 255)Primary interactive cyan greenrgb(77, 230, 128)Healthy, live, success amberrgb(255, 199, 51)Warning, compact, degraded redrgb(255, 89, 89)Error, critical, blocked purplergb(179, 128, 255)Proof and hard-fail emphasis mutedwhite @ 50%Secondary text textwhitePrimary text
Text ( "Online" )
. foregroundStyle (RheaTheme.green)
Text ( "3 alerts" )
. foregroundStyle (RheaTheme.red)
Rectangle ()
. fill (RheaTheme.bg)
Mode Color normalgreen compactamber criticalred hard_failpurple
Pace Color greengreen yellowamber redred
Priority Color P0red P1amber P2accent
Status Color opensecondary claimedaccent donegreen blockedred
.glassCard() is the package's signature shell for compact, dense information surfaces.
VStack {
Text ( "Agent: Rex" )
Text ( "Tokens: 12K" )
}
. glassCard ()
Implementation:
public struct GlassCard : ViewModifier {
public init () {}
public func body ( content : Content) -> some View {
content
. padding ( 16 )
. background (
RoundedRectangle ( cornerRadius : 16 )
. fill (RheaTheme.card)
. overlay (
RoundedRectangle ( cornerRadius : 16 )
. stroke (RheaTheme.cardBorder, lineWidth : 1 )
)
)
}
}
RheaKit does not hide behind decorative type. It uses monospaced data presentation to keep numbers, pace, and status legible under load.
Context Font pattern Section headers .system(size: 10, weight: .bold, design: .monospaced)Body and payload content .system(size: 12, design: .monospaced)Badges and status pills .system(size: 9, weight: .bold, design: .monospaced)Tiny indicators .system(size: 8-9, design: .monospaced)
Every visible status color must map back to a real state field.
Every number shown in a card must have a refresh or provenance path.
Decorative panels are allowed, but they cannot outrank the primary action or the current risk signal.
Zero after restart is not a bug if the source of truth is in-memory governor state. The UI should treat that zero as truth, not as loss.