Skip to content

Theme · Modules

1 module · 6 exports · 0 repositories · 0 e2e tests · 1 route

Who imports who · hover a node
Depends onTheme modulesUsed byThemePalette6 exportsActions2 filesRoutes1 fileComponents2 files

ThemePalette

app/features/theme/core/ThemePalette.ts

No overview comment at the top of the file.

Imports
no other modules
Used by
2 actions1 route2 components

Types

type

ThemeInput

no JSDoc:11
export type ThemeInput = v.InferOutput<typeof themeInputSchema>;

Functions & values

const

DEFAULT_THEME_INPUT

no JSDoc:13
export const DEFAULT_THEME_INPUT: ThemeInput = {
	baseHue: 268,
	baseChroma: 0.05,
	accentHue: 253,
	accentChroma: 0.24,
	bgLightness: THEME_INPUT_LIMITS.BG_LIGHTNESS_DEFAULT,
	chatHue: null,
	radiusBox: 3,
	radiusField: 2,
	radiusSelector: 2,
	borderWidth: 2,
	sizeField: 1,
function

toThemeInput

:233

Recovers the slider values a stored custom theme was built from.

export function toThemeInput(theme: CustomTheme): ThemeInput
Unit tests (1)
function

toShareCode

:256

Serializes the slider values into a share code other users can paste into their theme selector.

export function toShareCode(input: ThemeInput): string
function

fromShareCode

:264

Parses a share code made by toShareCode() (also older ones without the later added keys), returns null if it is not a valid theme.

export function fromShareCode(code: string): ThemeInput | null
Unit tests (3)

Not shown, only used by tests: resolveColors, textContrastPairs