FERS 1.0.0
The Flexible Extensible Radar Simulator
Loading...
Searching...
No Matches
theme.ts
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-only
2// Copyright (c) 2025-present FERS Contributors (see AUTHORS.md).
3
4import { createTheme, responsiveFontSizes } from '@mui/material/styles';
5
6/**
7 * FERS "Deep Radar" Color Palette.
8 * A high-contrast, engineering-focused dark theme tailored for data visualization.
9 */
10export const fersColors = {
11 background: {
12 default: '#0b0e14', // Deep Gunmetal - Main app background
13 paper: '#151b24', // Lighter Gunmetal - Panels and Cards
14 canvas: '#020408', // Near Pitch Black - The 3D Void
15 // Glassmorphism overlay for HUD elements (labels)
16 overlay: 'rgba(21, 27, 36, 0.90)',
17 },
18 primary: {
19 main: '#38bdf8', // Sky Blue - Active elements, Buttons
20 dark: '#0284c7',
21 light: '#bae6fd',
22 contrastText: '#0f172a',
23 },
24 secondary: {
25 main: '#fbbf24', // Amber - Selection, Highlights
26 dark: '#d97706',
27 light: '#fde68a',
28 contrastText: '#1e1b4b',
29 },
30 text: {
31 primary: '#f0f6fc', // Off-white for high readability
32 secondary: '#8b949e', // Muted blue-grey for labels
33 disabled: '#484f58',
34 },
35 // 3D Scene Specific Semantics
36 platform: {
37 default: '#38bdf8', // Cyan (Primary) - Standard Platform color
38 selected: '#fbbf24', // Amber (Secondary) - Selected Platform glow
39 emission: '#fbbf24', // Self-illumination color when selected
40 },
41 physics: {
42 velocity: '#4ade80', // Neon Green - Vector forward
43 boresight: '#facc15', // Bright Yellow - Where the antenna points
44 motionPath: '#c084fc', // Lavender/Purple - Distinct from RF links
45 rcs: '#f97316', // Orange - RCS Sphere wireframe
46 },
47 link: {
48 monostatic: {
49 strong: '#22c55e', // Emerald - Strong Signal / Lock
50 weak: '#ef4444', // Red - Sub-noise / Ghost signal
51 },
52 illuminator: '#eab308', // Yellow - Transmit Energy
53 scattered: '#06b6d4', // Cyan - Scattered Return
54 direct: '#d946ef', // Fuchsia - Interference / Direct Path
55 },
56};
57
58// Create the Material UI theme instance
59let theme = createTheme({
60 palette: {
61 mode: 'dark',
62 primary: {
63 main: fersColors.primary.main,
64 dark: fersColors.primary.dark,
65 light: fersColors.primary.light,
66 contrastText: fersColors.primary.contrastText,
67 },
68 secondary: {
69 main: fersColors.secondary.main,
70 dark: fersColors.secondary.dark,
71 light: fersColors.secondary.light,
72 contrastText: fersColors.secondary.contrastText,
73 },
74 background: {
75 default: fersColors.background.default,
76 paper: fersColors.background.paper,
77 },
78 text: {
79 primary: fersColors.text.primary,
80 secondary: fersColors.text.secondary,
81 disabled: fersColors.text.disabled,
82 },
83 divider: '#30363d', // Subtle border color
84 action: {
85 hover: 'rgba(56, 189, 248, 0.08)', // Tinted with primary
86 selected: 'rgba(56, 189, 248, 0.16)',
87 },
88 },
89 typography: {
90 fontFamily: ['Inter', 'Roboto', 'sans-serif'].join(','),
91 h6: {
92 fontWeight: 600,
93 letterSpacing: '0.02em',
94 },
95 overline: {
96 fontWeight: 700,
97 letterSpacing: '0.1em',
98 },
99 },
100 shape: {
101 borderRadius: 8, // More modern, slightly rounded corners
102 },
103 components: {
104 MuiCssBaseline: {
105 styleOverrides: {
106 body: {
107 scrollbarColor: '#30363d #0b0e14',
108 '&::-webkit-scrollbar, & *::-webkit-scrollbar': {
109 backgroundColor: '#0b0e14',
110 width: '8px',
111 height: '8px',
112 },
113 '&::-webkit-scrollbar-thumb, & *::-webkit-scrollbar-thumb':
114 {
115 borderRadius: 8,
116 backgroundColor: '#30363d',
117 minHeight: 24,
118 border: '2px solid #0b0e14',
119 },
120 '&::-webkit-scrollbar-thumb:focus, & *::-webkit-scrollbar-thumb:focus':
121 {
122 backgroundColor: '#8b949e',
123 },
124 },
125 },
126 },
127 MuiPaper: {
128 styleOverrides: {
129 root: {
130 backgroundImage: 'none', // Remove the default MUI overlay lighten effect
131 border: '1px solid #30363d', // Add thin borders for definition
132 },
133 },
134 },
135 MuiButton: {
136 styleOverrides: {
137 root: {
138 textTransform: 'none', // More modern text style
139 fontWeight: 600,
140 },
141 },
142 },
143 },
144});
145
146theme = responsiveFontSizes(theme);
147
148export default theme;