@@ -47,6 +47,9 @@ declare module '@mui/material/styles' {
47
47
error ?: Interactiveness ;
48
48
code ?: string ;
49
49
surfaces ?: string ;
50
+
51
+ appNavigationBar ?: string ;
52
+ secondaryAppNavigationBar ?: string ;
50
53
}
51
54
52
55
// Defines the extended text color options used in the palette.
@@ -141,6 +144,9 @@ declare module '@mui/material/styles' {
141
144
To define any additional custom color options, you can extend the interface here.
142
145
*/
143
146
interface Palette {
147
+ surface : SurfaceTokens ;
148
+ interactive : InteractiveTokens ;
149
+ navigation : NavigationTokens ;
144
150
border : {
145
151
default : string ;
146
152
strong : string ;
@@ -164,9 +170,74 @@ declare module '@mui/material/styles' {
164
170
} ;
165
171
} ;
166
172
}
173
+
174
+ // surface tokens need to have enough contrast
175
+ // with text and interactive elements
176
+ type SurfaceTokens = {
177
+
178
+ /** main page background, content containers (pure bg color) */
179
+ primary : string ;
180
+
181
+ /** secondary surfaces (slightly darker bg) */
182
+ secondary : string ;
183
+
184
+ /** tertiary surfaces (even darker bg) */
185
+ tertiary : string ;
186
+
187
+ /** floating elements with depth (bg + shadow) */
188
+ elevated : string ;
189
+
190
+ /** modal backdrops (semi-transparent bg) */
191
+ overlay : string ;
192
+
193
+ /** highlight surfaces (eg. modal headers , tabs, ) */
194
+ tint : string ;
195
+
196
+ /** high contrast alternative (fg as bg) */
197
+ inverse : string ;
198
+ }
199
+
200
+ type InteractiveTokens = {
201
+ /** default interactive elements (primary color) */
202
+ primary : string ;
203
+
204
+ /** hover state for interactive elements (primary hover tint) */
205
+ hover : string ;
206
+
207
+ /** disabled state for interactive elements (primary disabled tint) */
208
+ disabled ?: string ;
209
+
210
+ /** pressed state for interactive elements (primary pressed tint) */
211
+ pressed : string ;
212
+
213
+ /** secondary interactive elements (secondary color) */
214
+ secondary : string ;
215
+
216
+ /** tertiary interactive elements (tertiary color) */
217
+ tertiary : string ;
218
+ } ;
219
+
220
+ type NavigationTokens = {
221
+ /** main navigation bar background */
222
+ primary : string ;
223
+
224
+ /** secondary navigation bar background */
225
+ secondary : string ;
226
+
227
+ /** active navigation item background */
228
+ active : string ;
229
+
230
+ /** hover state for navigation items */
231
+ hover : string ;
232
+ } ;
167
233
168
234
// Defines the options available for the palette.
169
235
interface PaletteOptions {
236
+
237
+ surface : SurfaceTokens ;
238
+ interactive : InteractiveTokens ;
239
+ navigation : NavigationTokens ;
240
+
170
241
border : {
171
242
default : string ;
172
243
strong : string ;
@@ -177,8 +248,11 @@ declare module '@mui/material/styles' {
177
248
alt : string ;
178
249
} ;
179
250
} ;
251
+
180
252
icon : {
181
253
default : string ;
254
+ dualTone ?: string ; // For icons with two colors
255
+ dualToneInverse ?: string ; // For icons with two colors in inverse mode (eg on primary colored bg)
182
256
secondary : string ;
183
257
brand : string ;
184
258
inverse : string ;
@@ -192,7 +266,38 @@ declare module '@mui/material/styles' {
192
266
}
193
267
}
194
268
269
+ export type ThemePalette = PaletteOptions
270
+
271
+
272
+
195
273
export const lightModePalette : PaletteOptions = {
274
+
275
+ surface : {
276
+ primary : Colors . charcoal [ 100 ] ,
277
+ secondary : Colors . charcoal [ 90 ] ,
278
+ tertiary : Colors . charcoal [ 80 ] ,
279
+ elevated : Colors . WHITE ,
280
+ overlay : alpha ( Colors . charcoal [ 90 ] , 0.8 ) ,
281
+ inverse : Colors . charcoal [ 10 ] ,
282
+ tint : `linear-gradient(90deg, ${ Colors . TEAL_BLUE } 0%, ${ Colors . DARK_TEAL } 100%)`
283
+ } ,
284
+
285
+ interactive : {
286
+ primary : Colors . KEPPEL ,
287
+ hover : Colors . keppel [ 50 ] ,
288
+ disabled : Colors . charcoal [ 90 ] ,
289
+ pressed : Colors . keppel [ 60 ] ,
290
+ secondary : Colors . keppel [ 40 ] ,
291
+ tertiary : Colors . keppel [ 70 ]
292
+ } ,
293
+
294
+ navigation : {
295
+ primary : "#252e31" ,
296
+ secondary : "#294957" ,
297
+ active : Colors . KEPPEL ,
298
+ hover : Colors . keppel [ 50 ]
299
+ } ,
300
+
196
301
primary : {
197
302
main : Colors . KEPPEL
198
303
} ,
@@ -305,6 +410,8 @@ export const lightModePalette: PaletteOptions = {
305
410
} ,
306
411
icon : {
307
412
default : Colors . accentGrey [ 10 ] ,
413
+ dualTone : Colors . KEPPEL ,
414
+ dualToneInverse : Colors . charcoal [ 10 ] ,
308
415
secondary : Colors . charcoal [ 40 ] ,
309
416
brand : Colors . keppel [ 40 ] ,
310
417
inverse : Colors . charcoal [ 100 ] ,
@@ -318,6 +425,32 @@ export const lightModePalette: PaletteOptions = {
318
425
} ;
319
426
320
427
export const darkModePalette : PaletteOptions = {
428
+
429
+ surface : {
430
+ primary : Colors . charcoal [ 10 ] ,
431
+ secondary : Colors . charcoal [ 20 ] ,
432
+ tertiary : Colors . charcoal [ 30 ] ,
433
+ elevated : Colors . charcoal [ 40 ] ,
434
+ overlay : alpha ( Colors . charcoal [ 20 ] , 0.8 ) ,
435
+ inverse : Colors . WHITE ,
436
+ tint : `linear-gradient(90deg, ${ Colors . charcoal [ 30 ] } 0%, ${ Colors . accentGrey [ 30 ] } 100%)` ,
437
+ } ,
438
+ interactive : {
439
+ primary : Colors . KEPPEL ,
440
+ hover : Colors . keppel [ 50 ] ,
441
+ disabled : Colors . charcoal [ 30 ] ,
442
+ pressed : Colors . keppel [ 60 ] ,
443
+ secondary : Colors . keppel [ 20 ] ,
444
+ tertiary : Colors . keppel [ 10 ]
445
+ } ,
446
+
447
+ navigation : {
448
+ primary : Colors . charcoal [ 10 ] ,
449
+ secondary : Colors . charcoal [ 20 ] ,
450
+ active : Colors . KEPPEL ,
451
+ hover : Colors . keppel [ 50 ]
452
+ } ,
453
+
321
454
primary : {
322
455
main : Colors . KEPPEL
323
456
} ,
@@ -430,6 +563,8 @@ export const darkModePalette: PaletteOptions = {
430
563
icon : {
431
564
default : Colors . charcoal [ 80 ] ,
432
565
secondary : Colors . charcoal [ 70 ] ,
566
+ dualTone : Colors . KEPPEL ,
567
+ dualToneInverse : Colors . charcoal [ 100 ] ,
433
568
brand : Colors . keppel [ 40 ] ,
434
569
inverse : Colors . charcoal [ 10 ] ,
435
570
weather : Colors . saffron [ 40 ] ,
0 commit comments