Skip to content

Commit 59d8298

Browse files
PPatBoydPatrick Boyd
andauthored
Add BkgAccentTint and TextAccentTint colors to the Office palette type (#3950)
* Add BkgAccentTint and TextAccentTint palette types * Add AccentTint colors to the fallback Office palette * Change files --------- Co-authored-by: Patrick Boyd <patboyd@exchange.microsoft.com>
1 parent ce19770 commit 59d8298

5 files changed

Lines changed: 38 additions & 0 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "minor",
3+
"comment": "Add BkgAccentTint and TextAccentTint palette types",
4+
"packageName": "@fluentui-react-native/theme-types",
5+
"email": "patboyd@exchange.microsoft.com",
6+
"dependentChangeType": "patch"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "minor",
3+
"comment": "Add BkgAccentTint and TextAccentTint palette types",
4+
"packageName": "@fluentui-react-native/win32-theme",
5+
"email": "patboyd@exchange.microsoft.com",
6+
"dependentChangeType": "patch"
7+
}

packages/theming/theme-types/src/palette.types.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,12 +166,28 @@ export interface OfficePalette {
166166

167167
/**
168168
* Accents
169+
*
170+
* Used to emphasize or create boundaries around/within UI.
169171
*/
172+
173+
// Used for general borders
170174
AccentDark: ColorValue;
175+
176+
// Used for separator lines
171177
AccentLight: ColorValue;
178+
179+
// Used for accent rectangles and bolder borders
172180
AccentEmphasis: ColorValue;
181+
182+
// Used for borders that outline the entire UI region
173183
AccentOutline: ColorValue;
174184

185+
// A subtle tint used to accent a region on top of Bkg
186+
BkgAccentTint: ColorValue;
187+
188+
// A foreground color used for contrasting text on top of BkgAccentTint
189+
TextAccentTint: ColorValue;
190+
175191
/**
176192
* Headers
177193
*

packages/theming/win32-theme/src/NativeModule/fallbackOfficeModule.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ const whiteColorsPalette: OfficePalette = {
131131
AccentLight: '#E6E6E6',
132132
AccentEmphasis: '#D83B01',
133133
AccentOutline: '#000000',
134+
BkgAccentTint: '#D2E0F4',
135+
TextAccentTint: '#242424',
134136
TextEmphasis2: '#D83B01',
135137
BkgCtlSubtleSelected: '#F3F3F3',
136138
TextCtlSubtleSelected: '#262626',

packages/theming/win32-theme/src/__tests__/__snapshots__/win32-theme.test.ts.snap

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2739,6 +2739,7 @@ exports[`createOfficeTheme test 1`] = `
27392739
"AccentLight": "#E6E6E6",
27402740
"AccentOutline": "#000000",
27412741
"Bkg": "antiquewhite",
2742+
"BkgAccentTint": "#D2E0F4",
27422743
"BkgCtl": "#E6E6E6",
27432744
"BkgCtlDisabled": "#E6E6E6",
27442745
"BkgCtlEmphasis": "#D83B01",
@@ -2818,6 +2819,7 @@ exports[`createOfficeTheme test 1`] = `
28182819
"StrokeToggleSwitchOnHover": "#EA6115",
28192820
"StrokeToggleSwitchOnPressed": "#A22C01",
28202821
"Text": "#262626",
2822+
"TextAccentTint": "#242424",
28212823
"TextActive": "#262626",
28222824
"TextActiveHover": "#EA6115",
28232825
"TextActivePressed": "#A22C01",
@@ -3222,6 +3224,7 @@ exports[`fallbackGetPalette test Random palette 1`] = `
32223224
"AccentLight": "#E6E6E6",
32233225
"AccentOutline": "#000000",
32243226
"Bkg": "#FFFFFF",
3227+
"BkgAccentTint": "#D2E0F4",
32253228
"BkgCtl": "#E6E6E6",
32263229
"BkgCtlDisabled": "#E6E6E6",
32273230
"BkgCtlEmphasis": "#D83B01",
@@ -3301,6 +3304,7 @@ exports[`fallbackGetPalette test Random palette 1`] = `
33013304
"StrokeToggleSwitchOnHover": "#EA6115",
33023305
"StrokeToggleSwitchOnPressed": "#A22C01",
33033306
"Text": "#262626",
3307+
"TextAccentTint": "#242424",
33043308
"TextActive": "#262626",
33053309
"TextActiveHover": "#EA6115",
33063310
"TextActivePressed": "#A22C01",
@@ -3364,6 +3368,7 @@ exports[`fallbackGetPalette test TaskPane palette 1`] = `
33643368
"AccentLight": "#E6E6E6",
33653369
"AccentOutline": "#000000",
33663370
"Bkg": "antiquewhite",
3371+
"BkgAccentTint": "#D2E0F4",
33673372
"BkgCtl": "#E6E6E6",
33683373
"BkgCtlDisabled": "#E6E6E6",
33693374
"BkgCtlEmphasis": "#D83B01",
@@ -3443,6 +3448,7 @@ exports[`fallbackGetPalette test TaskPane palette 1`] = `
34433448
"StrokeToggleSwitchOnHover": "#EA6115",
34443449
"StrokeToggleSwitchOnPressed": "#A22C01",
34453450
"Text": "#262626",
3451+
"TextAccentTint": "#242424",
34463452
"TextActive": "#262626",
34473453
"TextActiveHover": "#EA6115",
34483454
"TextActivePressed": "#A22C01",

0 commit comments

Comments
 (0)