-
Notifications
You must be signed in to change notification settings - Fork 163
/
Copy pathpaletteFromOfficeColors.ts
142 lines (116 loc) · 4.65 KB
/
paletteFromOfficeColors.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
import type { Palette, OfficePalette } from '@fluentui-react-native/theme-types';
export function paletteFromOfficeColors(p: OfficePalette): Palette {
return {
background: p.Bkg,
bodyStandoutBackground: p.Bkg,
bodyFrameBackground: p.Bkg,
bodyFrameDivider: p.AccentLight,
bodyText: p.Text,
bodyTextChecked: p.TextSelected,
subText: p.TextSecondary,
bodyDivider: p.AccentLight,
disabledBackground: p.BkgCtlSubtleDisabled,
disabledText: p.TextCtlSubtleDisabled,
disabledBodyText: p.TextDisabled,
focusBorder: p.StrokeKeyboard,
variantBorder: p.AccentOutline,
errorText: p.TextError,
inputBorder: p.StrokeCtlSubtle,
inputBackground: p.BkgCtlSubtle,
inputFocusBorderAlt: p.StrokeCtlSubtleKeyboard,
inputText: p.TextCtlSubtle,
inputPlaceholderText: p.TextCtlSubtlePlaceholder,
buttonBackground: p.BkgCtl,
buttonBackgroundChecked: p.BkgCtlSelected,
buttonBackgroundHovered: p.BkgCtlHover,
buttonBackgroundPressed: p.BkgCtlPressed,
buttonBackgroundDisabled: p.BkgCtlDisabled,
buttonBorder: p.StrokeCtl,
buttonText: p.TextCtl,
buttonTextHovered: p.TextCtlHover,
buttonTextChecked: p.TextCtlSelected,
buttonTextPressed: p.TextCtlPressed,
buttonTextDisabled: p.TextCtlDisabled,
buttonBorderDisabled: p.StrokeCtlDisabled,
buttonBorderFocused: p.StrokeCtlKeyboard,
primaryButtonBackground: p.BkgCtlEmphasis,
primaryButtonBackgroundHovered: p.BkgCtlEmphasisHover,
primaryButtonBackgroundPressed: p.BkgCtlEmphasisPressed,
primaryButtonBackgroundDisabled: p.BkgCtlEmphasisDisabled,
primaryButtonBorder: p.StrokeCtlEmphasis,
primaryButtonBorderFocused: p.StrokeCtlEmphasisKeyboard,
primaryButtonText: p.TextCtlEmphasis,
primaryButtonTextHovered: p.TextCtlEmphasisHover,
primaryButtonTextPressed: p.TextCtlEmphasisPressed,
primaryButtonTextDisabled: p.TextCtlEmphasisDisabled,
accentButtonBackground: p.BkgCtlEmphasis,
menuBackground: p.Bkg,
menuDivider: p.AccentLight,
menuIcon: p.Text,
menuItemBackgroundHovered: p.BkgHover,
menuItemBackgroundPressed: p.BkgPressed,
menuItemText: p.Text,
menuItemTextHovered: p.TextHover,
listHeaderBackgroundHovered: p.BkgHover,
listHeaderBackgroundPressed: p.BkgPressed,
actionLink: p.TextActive,
link: p.TextHyperlink,
linkHovered: p.TextHyperlinkHover,
linkPressed: p.TextHyperlinkPressed,
defaultBackground: p.BkgCtl,
defaultBorder: p.StrokeCtl,
defaultContent: p.TextCtl,
defaultIcon: p.TextCtl,
defaultHoveredBackground: p.BkgCtlHover,
defaultHoveredBorder: p.StrokeCtlHover,
defaultHoveredContent: p.TextCtlHover,
defaultHoveredIcon: p.TextCtlHover,
defaultFocusedBackground: p.BkgCtlHover,
defaultFocusedBorder: p.StrokeCtlKeyboard,
defaultFocusedContent: p.TextCtlHover,
defaultFocusedIcon: p.TextCtlHover,
defaultPressedBackground: p.BkgCtlPressed,
defaultPressedBorder: p.StrokeCtlPressed,
defaultPressedContent: p.TextCtlPressed,
defaultPressedIcon: p.TextCtlPressed,
defaultDisabledBackground: p.BkgCtlDisabled,
defaultDisabledBorder: p.StrokeCtlDisabled,
defaultDisabledContent: p.TextCtlDisabled,
defaultDisabledIcon: p.TextCtlDisabled,
ghostBackground: p.Bkg,
ghostBorder: p.Bkg,
ghostContent: p.Text,
ghostIcon: p.Text,
ghostHoveredBackground: p.BkgHover,
ghostHoveredBorder: p.BkgHover,
ghostHoveredContent: p.TextHover,
ghostHoveredIcon: p.TextHover,
ghostFocusedBackground: p.BkgHover,
ghostFocusedBorder: p.StrokeKeyboard,
ghostFocusedContent: p.TextHover,
ghostFocusedIcon: p.TextHover,
ghostPressedBackground: p.BkgPressed,
ghostPressedBorder: p.BkgPressed,
ghostPressedContent: p.TextPressed,
ghostPressedIcon: p.TextPressed,
ghostDisabledBackground: p.Bkg,
ghostDisabledBorder: p.Bkg,
ghostDisabledContent: p.TextDisabled,
ghostDisabledIcon: p.TextDisabled,
brandedBackground: p.BkgCtlEmphasis,
brandedDisabledBorder: p.StrokeCtlEmphasisDisabled,
defaultCheckedBackground: p.BkgCtlSelected,
defaultCheckedContent: p.TextCtlSelected,
defaultCheckedHoveredBackground: p.BkgCtlHover,
defaultCheckedHoveredContent: p.TextCtlHover,
ghostCheckedBackground: p.BkgSelected,
ghostCheckedContent: p.TextSelected,
ghostCheckedHoveredBackground: p.BkgHover,
ghostCheckedHoveredContent: p.TextHover,
ghostCheckedHoveredBorder: p.StrokeSelectedHover,
ghostSecondaryContent: p.TextSecondary,
ghostFocusedSecondaryContent: p.TextSecondaryHover,
ghostHoveredSecondaryContent: p.TextSecondaryHover,
ghostPressedSecondaryContent: p.TextSecondaryPressed,
};
}