--- a/design-documents/066-wallet-color-scheme.rst +++ b/design-documents/066-wallet-color-scheme.rst @@ -92,14 +92,15 @@ #d3deff
- - Background for FABs, cards, filled fields + - Background for FABs, cards, filled fields; a tonal fill in the primary + hue (about Material 3 tone 90) * - onPrimaryContainer - .. raw:: html #00134a
- - Foreground for ``primaryContainer`` + - Foreground for ``primaryContainer``: 13.14:1 on it * - darkPrimary - .. raw:: html @@ -120,14 +121,14 @@ #0042b3
- - Container in dark mode + - Container in dark mode (about tone 30) * - darkOnPrimaryContainer - .. raw:: html #e5ebff
- - Foreground on container in dark + - Foreground on container in dark: 7.27:1 on ``darkPrimaryContainer`` @@ -164,17 +165,16 @@ - .. raw:: html #d9e3f9
- - Background for secondary surfaces + background:#d9e3f9;border:1px solid #aaa;margin-left:6px;vertical-align:middle;"> + - Background for secondary surfaces: selected chips, the current entry of + a navigation bar or menu, the track of a progress bar (tone 90) * - onSecondaryContainer - .. raw:: html #111c2b
- - Foreground on ``secondaryContainer`` + background:#111c2b;border:1px solid #aaa;margin-left:6px;vertical-align:middle;"> + - Foreground on ``secondaryContainer``: 13.31:1 on it * - darkSecondary - .. raw:: html @@ -195,18 +195,19 @@ * - darkSecondaryContainer - .. raw:: html - #72a3e5
- - Background container in dark + #414659
+ - Background container in dark (tone 30, as the other dark containers; the + Android wallet's value). Was ``#72a3e5``, tone 66: a light fill on the + dark background, on which its foreground ``#003869`` reached only 4.57:1 * - darkOnSecondaryContainer - .. raw:: html - #003869
- - Foreground for container in dark + #e3e2e9
+ - Foreground for container in dark (tone 90): 7.27:1 on + ``darkSecondaryContainer`` @@ -366,14 +367,15 @@ #337a40
- - Status indicators, confirmation icons + - Status indicators, confirmation icons, and text such as "Verified": + 5.17:1 on ``background``, 4.62:1 on ``surface`` * - onSuccess - .. raw:: html #ffffff
- - Foreground on success + - Foreground on success: 5.25:1 on ``success`` * - successContainer - .. raw:: html @@ -392,16 +394,19 @@ * - darkSuccess - .. raw:: html - #337a40
- - Same in dark mode (stable tone) + #81c784
+ - Success in dark mode, also as text: 9.22:1 on ``darkBackground``, 7.92:1 + on ``darkSurface`` (the Android wallet's value). Was ``#337a40``, the + light value, which has 3.53:1 on ``darkBackground`` * - darkOnSuccess - .. raw:: html - #ffffff
- - Foreground for dark mode + #003912
+ - Foreground for dark mode (tone 20 of the success palette): 6.55:1 on + ``darkSuccess``. Was ``#ffffff``, which has 2.01:1 on ``#81c784`` * - darkSuccessContainer - .. raw:: html @@ -432,16 +437,20 @@ * - warning - .. raw:: html - #f99c06
- - Alert banners, passive warnings + #875200
+ - Alert icons and text, passive warnings: 6.39:1 on ``background``, 5.71:1 + on ``surface`` (tone 40 of the warning palette). Was ``#f99c06``, a fill + that has 2.11:1 on ``background``; alert banners take + ``warningContainer`` * - onWarning - .. raw:: html - #000000
- - Foreground text on warning + #ffffff
+ - Foreground text on warning: 6.49:1 on ``warning``. Was ``#000000``, for + ``#f99c06`` * - warningContainer - .. raw:: html @@ -462,14 +471,15 @@ #f99c06
- - Warning in dark mode + - Warning in dark mode, also as text: 8.65:1 on ``darkBackground``, 7.42:1 + on ``darkSurface`` * - darkOnWarning - .. raw:: html #000000
- - Foreground in dark + - Foreground in dark: 9.79:1 on ``darkWarning`` * - darkWarningContainer - .. raw:: html @@ -526,6 +536,69 @@ - Text/icons in dark mode background +Surface +^^^^^^^ + +Cards, sheets, dialogs, menus and text fields: the areas that sit on the +background. A card stands out from the background by the surface's own tone, +so that it needs no border. + +.. list-table:: + :widths: 20 30 50 + :header-rows: 1 + + * - Role + - Hex + - Usage + + * - surface + - .. raw:: html + + #f0f0f4
+ - Cards, dialogs, menus, fields (tone 95 of the neutral palette of + ``onBackground``): 1.12:1 against ``background``. The Android wallet + uses ``#fdfdff``, the same as ``background``, so that a card is set off + only by a border or a shadow + + * - onSurface + - .. raw:: html + + #1c1b1f
+ - Text/icons on ``surface``: 15.07:1 on it + + * - onSurfaceVariant + - .. raw:: html + + #45474f
+ - Quieter text on ``surface`` and ``background``, such as hints and help: + 8.15:1 on ``surface``, 9.12:1 on ``background`` + + * - darkSurface + - .. raw:: html + + #202226
+ - Surface in dark mode: 1.16:1 against ``darkBackground`` + + * - darkOnSurface + - .. raw:: html + + #e5e2e1
+ - Text/icons on ``darkSurface``: 12.36:1 on it + + * - darkOnSurfaceVariant + - .. raw:: html + + #a7adb7
+ - Quieter text in dark mode: 7.06:1 on ``darkSurface``, 8.22:1 on + ``darkBackground`` + + Outline ^^^^^^^ @@ -542,16 +615,118 @@ #767880
- - Used for input borders, field outlines + - Used for input borders, field outlines, outlined buttons: 4.33:1 on + ``background``, 3.87:1 on ``surface`` (WCAG 1.4.11 asks 3:1 for the + boundary of a control) * - outlineVariant - .. raw:: html #c4c6d0
- - Decorative borders, dividers + - Decorative borders, dividers, the borders of cards (no contrast + requirement: they do not identify a control) + + * - darkOutline + - .. raw:: html + + #8f9199
+ - Outline in dark mode (tone 60 of the neutral variant palette, as + ``outline`` is tone 50): 5.90:1 on ``darkBackground``, 5.07:1 on + ``darkSurface`` + + * - darkOutlineVariant + - .. raw:: html + #45474f
+ - Outline variant in dark mode (tone 30, as ``outlineVariant`` is tone 80) + + + +Contrast +~~~~~~~~ + +WCAG 2.1 AA asks 4.5:1 for text against what it is drawn on (success +criterion 1.4.3) and 3:1 for the boundary of a control such as a text field +(1.4.11). Each ``on*`` role is text on its role; ``primary``, ``secondary``, +``error``, ``success`` and ``warning`` are also text and icons on the +background and on surfaces, and ``outline`` is the border of fields. The +ratios, with the WCAG 2.1 relative luminance: + +.. list-table:: + :widths: 50 25 25 + :header-rows: 1 + * - Pair + - Light + - Dark + * - onPrimary on primary + - 8.64 + - 7.72 + * - onPrimaryContainer on primaryContainer + - 13.14 + - 7.27 + * - onSecondary on secondary + - 5.48 + - 7.75 + * - onSecondaryContainer on secondaryContainer + - 13.31 + - 7.27 + * - onTertiary on tertiary + - 3.48 (below 4.5) + - 7.72 + * - onError on error + - 6.54 + - 7.72 + * - onErrorContainer on errorContainer + - 12.77 + - 4.54 + * - onSuccess on success + - 5.25 + - 6.55 + * - onWarning on warning + - 6.49 + - 9.79 + * - onWarningContainer on warningContainer + - 7.21 + - 7.78 + * - onBackground on background + - 16.81 + - 14.41 + * - onSurface on surface + - 15.07 + - 12.36 + * - onSurfaceVariant on surface + - 8.15 + - 7.06 + * - primary on background / surface + - 8.51 / 7.60 + - 10.93 / 9.38 + * - secondary on background / surface + - 5.39 / 4.82 + - 10.93 / 9.39 + * - error on background / surface + - 6.43 / 5.75 + - 10.92 / 9.38 + * - success on background / surface + - 5.17 / 4.62 + - 9.22 / 7.92 + * - warning on background / surface + - 6.39 / 5.71 + - 8.65 / 7.42 + * - outline on background / surface + - 4.33 / 3.87 + - 5.90 / 5.07 + +``onTertiary`` on ``tertiary`` passes only the 3:1 of large text and icons. +The colours are tones of Material 3 palettes: a tone is the lightness of the +HCT colour model, from 0 to 100, and a palette keeps the hue and the chroma of +its colour. Material 3 makes the light scheme's accents from tone 40 and its +containers from tone 90, the dark scheme's accents from tone 80 and its +containers from tone 30, and the colours on them from tones far enough away +for these ratios. Definition of Done ------------------