Skip to content

Commit 2114a11

Browse files
pekingmeimhappi
authored andcommittedAug 14, 2023
[Docs] Updated dev doc for tonal surface colors in affected components.
PiperOrigin-RevId: 556901517
1 parent c04eaba commit 2114a11

18 files changed

+64
-57
lines changed
 

‎docs/components/BottomAppBar.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ floating action button (FAB), action item(s) and an overflow menu.
236236

237237
Element | Attribute | Related method(s) | Default value
238238
------------- | ------------------------ | ------------------------------------------ | -------------
239-
**Color** | `app:backgroundTint` | `setBackgroundTint`<br>`getBackgroundTint` | `?attr/colorSurface`
239+
**Color** | `app:backgroundTint` | `setBackgroundTint`<br>`getBackgroundTint` | `?attr/colorSurfaceContainer`
240240
**Elevation** | `app:elevation` | `setElevation` | `3dp`
241241
**Height** | `android:minHeight` | `setMinimumHeight`<br>`getMinimumHeight` | `80dp`
242242
**Shadows** | `app:addElevationShadow` | N/A | `false`

‎docs/components/BottomNavigation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ The following is an anatomy diagram for the bottom navigation bar:
264264

265265
**Element** | **Attribute** | **Related methods** | **Default value**
266266
----------------- | --------------------- | ------------------- | -----------------
267-
**Color** | `app:backgroundTint` | N/A | `?attr/colorSurface`
267+
**Color** | `app:backgroundTint` | N/A | `?attr/colorSurfaceContainer`
268268
**Elevation** | `app:elevation` | `setElevation` | `3dp`
269269
**Compat Shadow** | `compatShadowEnabled` | N/A | `false`
270270

‎docs/components/BottomSheet.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -421,8 +421,8 @@ Content can also be added below the drag handle. (see [Using bottom sheets](#usi
421421

422422
Element | Attribute | Related method(s) | Default value
423423
-------------- | --------------------- | --------------------------------- | -------------
424-
**Color** | `app:backgroundTint` | N/A | `?attr/colorSurface`
425-
**Shape** | `app:shapeAppearance` | N/A | `?attr/shapeAppearanceLargeComponent`
424+
**Color** | `app:backgroundTint` | N/A | `?attr/colorSurfaceContainerLow`
425+
**Shape** | `app:shapeAppearance` | N/A | `?attr/shapeAppearanceCornerExtraLarge`
426426
**Elevation** | `android:elevation` | N/A | `1dp`
427427
**Max width** | `android:maxWidth` | `setMaxWidth`<br/>`getMaxWidth` | `640dp`
428428
**Max height** | `android:maxHeight` | `setMaxHeight`<br/>`getMaxHeight` | N/A

‎docs/components/Button.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ Element | Attribute | Related method(s) |
143143

144144
Element | Attribute | Related method(s) | Default value
145145
---------------- | --------------------- | ---------------------------------------------------------------------------- | -------------
146-
**Color** | `app:backgroundTint` | `setBackgroundColor`<br/>`setBackgroundTintList`<br/>`getBackgroundTintList` | `?attr/colorSurface` (see all [states](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/button/res/color/m3_text_button_background_color_selector.xml))
146+
**Color** | `app:backgroundTint` | `setBackgroundColor`<br/>`setBackgroundTintList`<br/>`getBackgroundTintList` | `?attr/colorSurfaceContainerLow` (see all [states](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/button/res/color/m3_text_button_background_color_selector.xml))
147147
**Stroke color** | `app:strokeColor` | `setStrokeColor`<br/>`setStrokeColorResource`<br/>`getStrokeColor` | `null`
148148
**Stroke width** | `app:strokeWidth` | `setStrokeWidth`<br/>`setStrokeWidthResource`<br/>`getStrokeWidth` | `0dp`
149149
**Shape** | `app:shapeAppearance` | `setShapeAppearanceModel`<br/>`getShapeAppearanceModel` | `?attr/shapeAppearanceSmallComponent`

‎docs/components/Card.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ shown in the [card examples](#card-examples) section.
367367

368368
Element | Attribute | Related method(s) | Default value
369369
-------------------- | ------------------------- | ------------------------------------------------------------------- | -------------
370-
**Color** | `app:cardBackgroundColor` | `setCardBackgroundColor`<br/>`getCardBackgroundColor` | `?attr/colorSurface` or `?attr/colorSurfaceVariant` (filled style)
370+
**Color** | `app:cardBackgroundColor` | `setCardBackgroundColor`<br/>`getCardBackgroundColor` | `?attr/colorSurface` (outlined style)</br>`?attr/colorSurfaceContainerHighest` (filled style)</br>`?attr/colorSurfaceContainerLow` (elevated style)
371371
**Foreground color** | `app:cardForegroundColor` | `setCardForegroundColor`<br/>`getCardForegroundColor` | `@android:color/transparent` (see all [states](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/card/res/color/m3_card_foreground_color.xml))
372372
**Stroke color** | `app:strokeColor` | `setStrokeColor`<br/>`getStrokeColor`<br/>`getStrokeColorStateList` | `?attr/colorOutline` (unchecked)<br/>`?attr/colorSecondary` (checked)
373373
**Stroke width** | `app:strokeWidth` | `setStrokeWidth`<br/>`getStrokeWidth` | `1dp` (outlined style)<br/>`0dp` (elevated or filled style)

‎docs/components/DatePicker.md

+7
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,13 @@ The following diagram shows the elements of a date picker:
294294
6. Current date
295295
7. Selected date
296296

297+
### Container
298+
299+
Element | Attribute | Related method(s) | Default value
300+
--------- | --------------------- | ----------------- | -------------
301+
**Color** | `app:backgroundTint` | N/A | `?attr/colorSurfaceContainerHigh`
302+
**Shape** | `app:shapeAppearance` | N/A | `?attr/shapeAppearanceCornerExtraLarge`
303+
297304
### Title
298305

299306
Element | Attribute | Related method(s) | Default value

‎docs/components/Dialog.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ particular type), a background scrim, and, optionally, title and buttons.
126126

127127
Element | **Attribute** | **Related methods** | **Default value**
128128
----------------------------------- | -------------------------------------------------------- | ------------------------------------------------------ | -----------------
129-
**Color** | `app:backgroundTint` | N/A | `?attr/colorSurface`
130-
**Shape** | `app:shapeAppearance`<br/>`app:shapeAppearanceOverlay` | N/A | `?attr/shapeAppearanceMediumComponent` with a corner size of `28dp`
129+
**Color** | `app:backgroundTint` | N/A | `?attr/colorSurfaceContainerHigh`
130+
**Shape** | `app:shapeAppearance`<br/>`app:shapeAppearanceOverlay` | N/A | `?attr/shapeAppearanceCornerExtraLarge`
131131
**Background inset start and end** | `app:backgroundInsetStart`<br/>`app:backgroundInsetEnd` | `setBackgroundInsetStart`<br/>`setBackgroundInsetEnd` | `24dp`
132132
**Background inset top and bottom** | `app:backgroundInsetTop`<br/>`app:backgroundInsetBottom` | `setBackgroundInsetTop`<br/>`setBackgroundInsetBottom` | `80dp`
133133

‎docs/components/Menu.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ The following are menu anatomy diagrams showing all possible elements:
426426
Element | Attribute | Related method(s) | Default value
427427
-------------- | ----------------------------- | ----------------- | -------------
428428
**Background** | `android:popupMenuBackground` | N/A | `?attr/popupMenuBackground`
429-
**Color** | N/A | N/A | `?attr/colorSurface`
429+
**Color** | N/A | N/A | `?attr/colorSurfaceContainer`
430430
**Elevation** | `android:popupElevation` | N/A | `3dp`
431431

432432
#### Text attributes
@@ -571,17 +571,17 @@ For all attributes that apply to the `TextInputLayout`, see the
571571
#### `MaterialAutoCompleteTextView` attributes (input text, dropdown menu)
572572

573573
Element | Attribute | Related method(s) | Default value
574-
----------------------------------------- | ------------------------------------------------------------------- |-----------------------------------------------------------------------------------------------------| -------------
574+
----------------------------------------- | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | -------------
575575
**Input text** | `android:text` | `setText`<br/>`getText` | `@null`
576576
**Typography** | `android:textAppearance` | `setTextAppearance` | `?attr/textAppearanceBodyLarge`
577577
**Input accepted** | `android:inputType` | `N/A` | framework's default
578578
**Input text color** | `android:textColor` | `setTextColor`<br/>`getTextColors`<br/>`getCurrentTextColor` | `?android:textColorPrimary`
579579
**Cursor color** | N/A (color comes from the theme attr `?attr/colorControlActivated`) | N/A | `?attr/colorPrimary`
580-
**Dropdown menu<br/>container color** | `app:dropDownBackgroundTint` | `setDropDownBackgroundTint`<br/>`setDropDownBackgroundTintList`<br/>`getDropDownBackgroundTintList` | `@null`</br>(which means `colorSurface` with</br> elevation overlay will be used)
580+
**Dropdown menu<br/>container color** | `app:dropDownBackgroundTint` | `setDropDownBackgroundTint`<br/>`setDropDownBackgroundTintList`<br/>`getDropDownBackgroundTintList` | `colorSurfaceContainer`
581581
**Dropdown menu elevation** | `android:popupElevation` | `getPopupElevation` | `3dp`
582582
**Simple items** | `app:simpleItems` | `setSimpleItems` | `null`
583583
**Simple item layout** | `app:simpleItemLayout` | N/A | `@layout/m3_auto_complete_simple_item`
584-
**Selected simple item color** | `app:simpleItemSelectedColor` | `setSimpleItemSelectedColor`<br/>`getSimpleItemSelectedColor` | `?attr/colorSurfaceVariant`
584+
**Selected simple item color** | `app:simpleItemSelectedColor` | `setSimpleItemSelectedColor`<br/>`getSimpleItemSelectedColor` | `?attr/colorSurfaceContainerHighest`
585585
**Selected simple item<br/>ripple color** | `app:simpleItemSelectedRippleColor` | `setSimpleItemSelectedRippleColor`<br/>`getSimpleItemSelectedRippleColor` | `@color/m3_simple_item_ripple_color`
586586

587587
#### Styles

‎docs/components/NavigationDrawer.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -263,12 +263,12 @@ subtitles, and an optional scrim.
263263

264264
Element | Attribute(s) | Related method(s) | Default value
265265
----------------------- | ------------------------------------------------------------------- | ------------------------------------------------ | -------------
266-
**Color** | `android:background` | `setBackground`<br>`getBackground` | `?attr/colorSurface`
266+
**Color** | `android:background` | `setBackground`<br>`getBackground` | `?attr/colorSurfaceContainerLow`
267267
**Shape** | `app:shapeAppearance`<br>`app:shapeAppearanceOverlay` | N/A | `null`
268268
**Elevation** | `app:elevation` (can be used on `NavigationView` or `DrawerLayout`) | `setElevation`<br>`getElevation` | `0dp` (`NavigationView`) or `1dp` (`DrawerLayout`)
269269
**Max width** | `android:maxWidth` | N/A | `280dp`
270270
**Fits system windows** | `android:fitsSystemWindows` | `setFitsSystemWindows`<br>`getFitsSystemWindows` | `true`
271-
**Drawer corner size** | `drawerLayoutCornerSize` | N/A | `16dp`
271+
**Drawer corner size** | `drawerLayoutCornerSize` | N/A | `16dp`
272272

273273
### Header attributes
274274

‎docs/components/ProgressIndicator.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ Element | Attribute | Related method(s)
293293
----------------------------- | --------------------------- | --------------------------------------------------------- | -------------
294294
**Track thickness** | `app:trackThickness` | `setTrackThickness`</br>`getTrackThickness` | `4dp`
295295
**Indicator color** | `app:indicatorColor` | `setIndicatorColor`</br>`getIndicatorColor` | `colorPrimary`
296-
**Track color** | `app:trackColor` | `setTrackColor`</br>`getTrackColor` | `indicatorColor` at `disabledAlpha`
296+
**Track color** | `app:trackColor` | `setTrackColor`</br>`getTrackColor` | `colorSurfaceContainerHighest` (linear)</br>`@android:color/transparent` (circular)
297297
**Track corner radius** | `app:trackCornerRadius` | `setTrackCornerRadius`</br>`getTrackCornerRadius` | `0dp`
298298
**Show animation behavior** | `app:showAnimationBehavior` | `setShowAnimationBehavior`</br>`getShowAnimationBehavior` | `none`
299299
**Hide animation behavior** | `app:hideAnimationBehavior` | `setHideAnimationBehavior`</br>`getHideAnimationBehavior` | `none`

‎docs/components/Search.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ Element | Attribute | Related method(s)
105105
**Search text appearance** | `android:textAppearance` | `setTextAppearance`<br/>`getTextAppearance` | `@style/TextAppearance.Material3.SearchBar`
106106
**Search text** | `android:text` | `setText`<br/>`getText` | `null`
107107
**Search hint** | `android:hint` | `setHint`<br/>`getHint` | `null`
108-
**Color** | `app:backgroundTint` | -- | `?attr/colorSurface`
108+
**Color** | `app:backgroundTint` | -- | `?attr/colorSurfaceContainerHigh`
109109
**Flag for default margins** | `app:defaultMarginsEnabled` | -- | `true`
110110
**Flag for navigation icon** | `app:hideNavigationIcon` | -- | `false`
111111

@@ -218,7 +218,7 @@ Element | Attribute | Related meth
218218
**Search text appearance** | `android:textAppearance` | `setTextAppearance`<br/>`getTextAppearance` | `@style/TextAppearance.Material3.SearchBar`
219219
**Search text** | `android:text` | `setText`<br/>`getText` | `null`
220220
**Search hint** | `android:hint` | `setHint`<br/>`getHint` | `null`
221-
**Color** | `app:backgroundTint` | -- | `?attr/colorSurface`
221+
**Color** | `app:backgroundTint` | -- | `?attr/colorSurfaceContainerHigh`
222222
**Flag for navigation icon** | `app:hideNavigationIcon` | -- | `true`
223223
**Flag for `DrawerArrowDrawable`** | `app:useDrawerArrowDrawable` | -- | `false`
224224
**Flag for soft keyboard** | `app:autoShowKeyboard` | -- | `true`

‎docs/components/SideSheet.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -264,15 +264,15 @@ Side sheets have a sheet, content, and, if modal, a scrim.
264264

265265
### Sheet attributes
266266

267-
Element | Attribute | Related method(s) | Default value
268-
-------------- |-----------------------------|---------------------------------------------------------| -------------
269-
**Color** | `app:backgroundTint` | N/A | `?attr/colorSurface`
267+
Element | Attribute | Related method(s) | Default value
268+
---------------------------- | --------------------------- | ------------------------------------------------------- | -------------
269+
**Color** | `app:backgroundTint` | N/A | `?attr/colorSurface`</br>`?attr/colorSurfaceContainerLow` (modal)
270270
**Coplanar sibling view id** | `app:coplanarSiblingViewId` | `setCoplanarSiblingViewId`<br/>`setCoplanarSiblingView` | N/A
271-
**Shape** | `app:shapeAppearance` | N/A | `?attr/shapeAppearanceLargeComponent`
272-
**Sheet edge** | `android:layout_gravity` | `setSheetEdge` (modal only) | end
273-
**Elevation** | `android:elevation` | N/A | 0dp
274-
**Max width** | `android:maxWidth` | `setMaxWidth`<br/>`getMaxWidth` | N/A
275-
**Max height** | `android:maxHeight` | `setMaxHeight`<br/>`getMaxHeight` | N/A
271+
**Shape** | `app:shapeAppearance` | N/A | `?attr/shapeAppearanceLargeComponent`
272+
**Sheet edge** | `android:layout_gravity` | `setSheetEdge` (modal only) | end
273+
**Elevation** | `android:elevation` | N/A | 0dp
274+
**Max width** | `android:maxWidth` | `setMaxWidth`<br/>`getMaxWidth` | N/A
275+
**Max height** | `android:maxHeight` | `setMaxHeight`<br/>`getMaxHeight` | N/A
276276

277277
### Behavior attributes
278278

‎docs/components/Slider.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ Element | Attribute | Related
299299
**Height** | `app:trackHeight` | `setTrackHeight`<br/>`getTrackHeight` | `4dp`
300300
**Color** | `app:trackColor` | `setTrackTintList`<br/>`getTrackTintList` | `null`
301301
**Color for track's active part** | `app:trackColorActive` | `setTrackActiveTintList`<br/>`getTrackActiveTintList` | `?attr/colorPrimary`
302-
**Color for track's inactive part** | `app:trackColorInactive` | `setTrackInactiveTintList`<br/>`getTrackInactiveTintList` | `?attr/colorSurfaceVariant`
302+
**Color for track's inactive part** | `app:trackColorInactive` | `setTrackInactiveTintList`<br/>`getTrackInactiveTintList` | `?attr/colorSurfaceContainerHighest`
303303
**Minimum separation for adjacent thumbs** | `app:minSeparation` | `setMinSeparation`<br/>`getMinSeparation` | `0dp`
304304

305305
**Note:** `app:trackColor` takes precedence over `app:trackColorActive` and

‎docs/components/Switch.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -155,17 +155,17 @@ switch by assigning `app:thumbIcon`. This icon will be centered and displayed on
155155
top of the thumb drawable.
156156

157157
Element | Attribute | Related method(s) | Default value
158-
--------- |---------------------|---------------------------------------------------| -------------
158+
--------- | ------------------- | ------------------------------------------------- | -------------
159159
**Icon** | `app:thumbIcon` | `setThumbIconDrawable`<br/>`getThumbIconDrawable` | `null`
160160
**Size** | `app:thumbIconSize` | `setThumbIconSize`<br/>`getThumbIconSize` | `16dp`
161-
**Color** | `app:thumbIconTint` | `setThumbIconTintList`<br/>`getThumbIconTintList` | `?attr/colorSurfaceVariant` (unchecked)<br/>`?attr/colorOnPrimaryContainer` (checked)
161+
**Color** | `app:thumbIconTint` | `setThumbIconTintList`<br/>`getThumbIconTintList` | `?attr/colorSurfaceContainerHighest` (unchecked)<br/>`?attr/colorOnPrimaryContainer` (checked)
162162

163163
### Track attributes
164164

165165
Element | Attribute | Related method(s) | Default value
166166
-------------------- | ------------------------- | ------------------------------------------------------------- | -------------
167167
**Track** | `app:track` | `setTrackDrawable`<br/>`getTrackDrawable` | `@drawable/mtrl_switch_track`
168-
**Color** | `app:trackTint` | `setTrackTintList`<br/>`getTrackTintList` | `?attr/colorSurfaceVariant` (unchecked)<br/>`?attr/colorPrimary` (checked)
168+
**Color** | `app:trackTint` | `setTrackTintList`<br/>`getTrackTintList` | `?attr/colorSurfaceContainerHighest` (unchecked)<br/>`?attr/colorPrimary` (checked)
169169
**Decoration** | `app:trackDecoration` | `setTrackDecorationDrawable`<br/>`getTrackDecorationDrawable` | `@drawable/mtrl_switch_track_decoration`<br/>(Shows an outline of the track.)
170170
**Decoration color** | `app:trackDecorationTint` | `setTrackDecorationTintList`<br/>`getTrackDecorationTintList` | `?attr/colorOutline` (unchecked)<br/>`@android:color/transparent` (checked)
171171

‎docs/components/TextField.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ indicator, optional helper/error text and optional leading/trailing icons.
462462

463463
Element | Attribute | Related method(s) | Default value
464464
---------------------- | ------------------------ | --------------------------------------------------------------------------------------- | -------------
465-
**Color** | `app:boxBackgroundColor` | `setBoxBackgroundColor`<br/>`setBoxBackgroundColorResource`<br/>`getBoxBackgroundColor` | `?attr/colorSurfaceVariant` (see all [states](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/textfield/res/color/m3_textfield_filled_background_color.xml))
465+
**Color** | `app:boxBackgroundColor` | `setBoxBackgroundColor`<br/>`setBoxBackgroundColorResource`<br/>`getBoxBackgroundColor` | `?attr/colorSurfaceContainerHighest` (see all [states](https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/textfield/res/color/m3_textfield_filled_background_color.xml))
466466
**Shape** | `app:shapeAppearance` | N/A | `?attr/shapeAppearanceSmallComponent`
467467
**Text field enabled** | `android:enabled` | `setEnabled` | `true`
468468

‎docs/components/TimePicker.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ Element | Attribute | Related metho
140140
**Title** | `N/A` | `Builder.setTitleText` | `Select Time`
141141
**Keyboard Icon** | `app:keyboardIcon` | `N/A` | `@drawable/ic_keyboard_black_24dp`
142142
**Clock Icon** | `app:clockIcon` | `N/A` | `@drawable/ic_clock_black_24dp`
143-
**Clock face Background Color** | `app:clockFaceBackgroundColor` | `N/A` | `?attr/colorSurfaceVariant`
143+
**Clock face Background Color** | `app:clockFaceBackgroundColor` | `N/A` | `?attr/colorSurfaceContainerHighest`
144144
**Clock hand color** | `app:clockNumberTextColor` | `N/A` | `?attr/colorPrimary`
145145
**Clock Number Text Color** | `app:clockNumberTextColor` | `N/A` | `?attr/colorOnBackground`
146146

‎docs/components/TopAppBar.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ Element | Attribute
407407
**`CollapsingToolbarLayout` scrim animation duration** | `app:scrimAnimationDuration` | `setScrimAnimationDuration`<br>`getScrimAnimationDuration` | `600`
408408
**`CollapsingToolbarLayout` collapsing animation interpolator** | `app:titlePositionInterpolator` | `setTitlePositionInterpolator` | `@null`
409409
**`AppBarLayout` lift on scroll** | `app:liftOnScroll` | `setLiftOnScroll`<br>`isLiftOnScroll` | `true`
410-
**`AppBarLayout` lift on scroll color** | `app:liftOnScrollColor` | N/A | `@null` (defaults to elevation overlay color)
410+
**`AppBarLayout` lift on scroll color** | `app:liftOnScrollColor` | N/A | `?attr/colorSurfaceContainer`
411411
**`AppBarLayout` lift on scroll target view** | `app:liftOnScrollTargetViewId` | `setLiftOnScrollTargetViewId`<br>`getLiftOnScrollTargetViewId` | `@null`
412412
**`AppBarLayout` scroll effect** | `app:layout_scrollEffect` | `setScrollEffect`<br>`getScrollEffect` | `none`
413413

‎docs/theming/Color.md

+25-25
Original file line numberDiff line numberDiff line change
@@ -70,29 +70,29 @@ combinations. These additional color attributes are as follows:
7070

7171
<!-- Auto-generated additional color table starts. Do not edit below or remove this comment. -->
7272

73-
Color Role | Android Attribute | Light Theme Baseline (Dynamic) Color | Dark Theme Baseline (Dynamic) Color
74-
------------------------- | ---------------------------- | ------------------------------------------------ | -----------------------------------
75-
Error | colorError | error40</br>(Same) | error80</br>(Same)
76-
On Error | colorOnError | white</br>(Same) | error20</br>(Same)
77-
Error Container | colorErrorContainer | error90</br>(Same) | error30</br>(Same)
78-
On Error Container | colorOnErrorContainer | error10</br>(Same) | error90</br>(Same)
79-
Outline | colorOutline | neutral_variant50</br>(system_neutral2_500) | neutral_variant60</br>(system_neutral2_400)
80-
Outline Variant | colorOutlineVariant | neutral_variant80</br>(system_neutral2_200) | neutral_variant30</br>(system_neutral2_700)
81-
Background | android:colorBackground | primary99</br>(system_neutral1_10) | neutral10</br>(system_neutral1_900)
82-
On Background | colorOnBackground | neutral10</br>(system_neutral1_900) | neutral90</br>(system_neutral1_100)
83-
Surface | colorSurface | primary99</br>(system_neutral1_10) | neutral10</br>(system_neutral1_900)
84-
On Surface | colorOnSurface | neutral10</br>(system_neutral1_900) | neutral90</br>(system_neutral1_100)
85-
Surface Variant | colorSurfaceVariant | neutral_variant90</br>(system_neutral2_100) | neutral_variant30</br>(system_neutral2_700)
86-
On Surface Variant | colorOnSurfaceVariant | neutral_variant30</br>(system_neutral2_700) | neutral_variant80</br>(system_neutral2_200)
87-
Inverse Surface | colorSurfaceInverse | neutral24</br>(system_neutral1_800) | neutral90</br>(system_neutral1_100)
88-
Inverse On Surface | colorOnSurfaceInverse | neutral95</br>(system_neutral1_50) | neutral24</br>(system_neutral1_800)
89-
Surface Bright | colorSurfaceBright | neutral98</br>(m3_ref_palette_dynamic_neutral98) | neutral24</br>(m3_ref_palette_dynamic_neutral24)
90-
Surface Dim | colorSurfaceDim | neutral87</br>(m3_ref_palette_dynamic_neutral87) | neutral6</br>(m3_ref_palette_dynamic_neutral6)
91-
Surface Container | colorSurfaceContainer | neutral94</br>(m3_ref_palette_dynamic_neutral94) | neutral12</br>(m3_ref_palette_dynamic_neutral12)
92-
Surface Container Low | colorSurfaceContainerLow | neutral96</br>(m3_ref_palette_dynamic_neutral96) | neutral10</br>(system_neutral1_900)
93-
Surface Container Lowest | colorSurfaceContainerLowest | white</br>(system_neutral1_0) | neutral4</br>(m3_ref_palette_dynamic_neutral4)
94-
Surface Container High | colorSurfaceContainerHigh | neutral92</br>(m3_ref_palette_dynamic_neutral92) | neutral17</br>(m3_ref_palette_dynamic_neutral17)
95-
Surface Container Highest | colorSurfaceContainerHighest | neutral90</br>(system_neutral1_100) | neutral24</br>(m3_ref_palette_dynamic_neutral22)
73+
Color Role | Android Attribute | Light Theme Baseline (Dynamic) Color | Dark Theme Baseline (Dynamic) Color
74+
------------------------- | ---------------------------- | -------------------------------------------------------- | -----------------------------------
75+
Error | colorError | error40</br>(Same) | error80</br>(Same)
76+
On Error | colorOnError | white</br>(Same) | error20</br>(Same)
77+
Error Container | colorErrorContainer | error90</br>(Same) | error30</br>(Same)
78+
On Error Container | colorOnErrorContainer | error10</br>(Same) | error90</br>(Same)
79+
Outline | colorOutline | neutral_variant50</br>(system_neutral2_500) | neutral_variant60</br>(system_neutral2_400)
80+
Outline Variant | colorOutlineVariant | neutral_variant80</br>(system_neutral2_200) | neutral_variant30</br>(system_neutral2_700)
81+
Background | android:colorBackground | neutral98</br>(m3_ref_palette_dynamic_neutral_variant98) | neutral6</br>(m3_ref_palette_dynamic_neutral_variant6)
82+
On Background | colorOnBackground | neutral10</br>(system_neutral1_900) | neutral90</br>(system_neutral1_100)
83+
Surface | colorSurface | neutral98</br>(m3_ref_palette_dynamic_neutral_variant98) | neutral6</br>(m3_ref_palette_dynamic_neutral_variant6)
84+
On Surface | colorOnSurface | neutral10</br>(system_neutral1_900) | neutral90</br>(system_neutral1_100)
85+
Surface Variant | colorSurfaceVariant | neutral_variant90</br>(system_neutral2_100) | neutral_variant30</br>(system_neutral2_700)
86+
On Surface Variant | colorOnSurfaceVariant | neutral_variant30</br>(system_neutral2_700) | neutral_variant80</br>(system_neutral2_200)
87+
Inverse Surface | colorSurfaceInverse | neutral20</br>(system_neutral1_800) | neutral90</br>(system_neutral1_100)
88+
Inverse On Surface | colorOnSurfaceInverse | neutral95</br>(system_neutral1_50) | neutral20</br>(system_neutral1_800)
89+
Surface Bright | colorSurfaceBright | neutral98</br>(m3_ref_palette_dynamic_neutral_variant98) | neutral24</br>(m3_ref_palette_dynamic_neutral_variant24)
90+
Surface Dim | colorSurfaceDim | neutral87</br>(m3_ref_palette_dynamic_neutral_variant87) | neutral6</br>(m3_ref_palette_dynamic_neutral_variant6)
91+
Surface Container | colorSurfaceContainer | neutral94</br>(m3_ref_palette_dynamic_neutral_variant94) | neutral12</br>(m3_ref_palette_dynamic_neutral_variant12)
92+
Surface Container Low | colorSurfaceContainerLow | neutral96</br>(m3_ref_palette_dynamic_neutral_variant96) | neutral10</br>(system_neutral2_900)
93+
Surface Container Lowest | colorSurfaceContainerLowest | white</br>(system_neutral2_0) | neutral4</br>(m3_ref_palette_dynamic_neutral_variant4)
94+
Surface Container High | colorSurfaceContainerHigh | neutral92</br>(m3_ref_palette_dynamic_neutral_variant92) | neutral17</br>(m3_ref_palette_dynamic_neutral_variant17)
95+
Surface Container Highest | colorSurfaceContainerHighest | neutral90</br>(system_neutral2_100) | neutral22</br>(m3_ref_palette_dynamic_neutral_variant22)
9696

9797
<!-- Auto-generated additional color table ends. Do not edit below or remove this comment. -->
9898

@@ -223,7 +223,7 @@ DynamicColors.applyToActivitiesIfAvailable(this, (activity, themeResId) -> {
223223
Or provide your own customized dynamic color theme overlays, likely inheriting
224224
from the Material3 theme overlays above, by doing:
225225

226-
``` java
226+
```java
227227
DynamicColors.applyToActivitiesIfAvailable(this, R.style.ThemeOverlay_MyApp_DynamicColors_DayNight);
228228
```
229229

@@ -637,7 +637,7 @@ produces the range of tones needed for both light and dark theme applications.
637637
We have provided the following two APIs in the `DynamicColorsOptions` class.
638638

639639
API Method | Description
640-
------------------------------ | ---------------------------------------
640+
------------------------------ | -----------
641641
#setContentBasedSource(Bitmap) | Provides a Bitmap from which a single source color is extracted as input
642642
#setContentBasedSource(int) | Provides a single source color as input
643643

0 commit comments

Comments
 (0)
Please sign in to comment.