MCPcopy Create free account
hub / github.com/callstack/react-native-paper / prepareSurfaceColors

Function prepareSurfaceColors

docs/src/utils/themes.tsx:75–98  ·  view source on GitHub ↗
(argbTheme: ARGBTheme)

Source from the content-addressed store, hash-verified

73};
74
75const prepareSurfaceColors = (argbTheme: ARGBTheme) => {
76 const { palettes } = themeFromSourceColor(argbTheme.primary);
77
78 const surfaceDisabled = Color(argbTheme.onSurface)
79 .alpha(opacity.level2)
80 .rgb()
81 .string();
82
83 const onSurfaceDisabled = Color(argbTheme.onSurface)
84 .alpha(opacity.level4)
85 .rgb()
86 .string();
87
88 const backdrop = Color(palettes.neutralVariant.tone(20))
89 .alpha(0.4)
90 .rgb()
91 .string();
92
93 return {
94 surfaceDisabled,
95 onSurfaceDisabled,
96 backdrop,
97 };
98};
99
100const prepareElevations = (argbTheme: ARGBTheme) => {
101 let elevations: Record<string, string> = {

Callers 1

prepareVariantFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…