11// the _on_white are precomputed colors so we can do less blending on mobile
22import { isDarkMode } from './dark-mode'
3+ import { partyMode } from '../local-debug'
34import { isIOS } from '../constants/platform'
45
56export const colors = {
@@ -262,6 +263,55 @@ export const darkColors: {[P in keyof typeof colors]: string | undefined} = {
262263 yellowLight : '#FFFDCC' ,
263264}
264265
266+ const partyFallbackColors = {
267+ black : 'rgba(255, 255, 255, 0.85)' ,
268+ get blackOrBlack ( ) {
269+ return colors . black
270+ } ,
271+ get blackOrWhite ( ) {
272+ return colors . white
273+ } ,
274+ get black_05OrBlack_60 ( ) {
275+ return colors . black_60
276+ } ,
277+ black_05_on_white : 'rgb(13, 13, 13)' ,
278+ black_10_on_white : 'rgb(26, 26, 26)' ,
279+ get black_20OrBlack ( ) {
280+ return colors . black
281+ } ,
282+ black_20_on_white : 'rgb(51, 51, 51)' ,
283+ get black_50OrWhite ( ) {
284+ return colors . white
285+ } ,
286+ get black_50OrWhite_75 ( ) {
287+ return colors . white_75
288+ } ,
289+ black_50_on_white : 'rgb(128, 128, 128)' ,
290+ black_60 : 'rgba(255, 255, 255, 0.60)' ,
291+ black_63 : 'rgba(255, 255, 255, 0.63)' ,
292+ black_on_white : 'rgb(217, 217, 217)' ,
293+ transparent : 'rgba(255, 255, 255, 0)' ,
294+ transparent_on_white : '#191919' ,
295+ white : '#191919' ,
296+ get whiteOrBlack ( ) {
297+ return colors . black
298+ } ,
299+ get whiteOrGreenDark ( ) {
300+ return '#FF00FF'
301+ } ,
302+ white_0 : 'rgba(25, 25, 25, 0)' ,
303+ white_0_on_white : '#191919' ,
304+ white_20_on_white : '#191919' ,
305+ get white_40OrBlack_60 ( ) {
306+ return colors . black_60
307+ } ,
308+ white_40_on_white : '#191919' ,
309+ white_75 : 'rgba(25, 25, 25, 0.75)' ,
310+ white_75_on_white : '#191919' ,
311+ white_90 : 'rgba(25, 25, 25, 0.90)' ,
312+ white_90_on_white : '#191919' ,
313+ }
314+
265315type Color = typeof colors
266316type Names = keyof Color
267317
@@ -272,6 +322,11 @@ export const themed = names.reduce<Color>(
272322 configurable : false ,
273323 enumerable : true ,
274324 get ( ) {
325+ if ( partyMode && isDarkMode ( ) ) {
326+ // sets all non-grayscale colors to magenta in dark mode when enabled
327+ return partyFallbackColors [ name ] || '#FF00FF'
328+ }
329+
275330 return isDarkMode ( ) ? darkColors [ name ] : colors [ name ]
276331 } ,
277332 } ) ,
0 commit comments