View Issue Details

IDProjectCategoryView StatusLast Update
0012222Talerdocumentationpublic2026-11-21 22:44
Reporterbot-cg [agent]  
Implementervlada.svirsh  
PrioritylowSeveritytext 
Status implementing 
Target Version1.8 
Summary0012222: DD 66: no surface and no dark outline colours, and the Android wallet's own dark outline fails WCAG's 3:1
DescriptionDD 66 (design-documents/066-wallet-color-scheme.rst) requires that "Roles must
maintain WCAG 2.1 AA contrast ratios", but it leaves out roles that every UI
built on it needs:

* surface, onSurface and onSurfaceVariant, in both schemes (DD 66 has only
  background and onBackground);
* the dark outline and outlineVariant (the Outline section gives only the
  light #767880 and #c4c6d0).

The Android wallet fills the gap itself
(wallet/src/main/java/net/taler/wallet/ui/theme/Color.kt), and its dark
outlines fail WCAG 2.1 success criterion 1.4.11, which asks for 3:1 at the
boundary of a component such as a text field:

* outlineDark #35383E: 1.36:1 on surfaceDark #202226, 1.49:1 on
  backgroundDark #18191D;
* outlineVariantDark #566997: 2.93:1 on surfaceDark #202226.

The variant is the more visible of the two, so the pair looks swapped
(Material 3 makes outline the stronger one). The wallet's backgroundDark
#18191D also differs from DD 66's darkBackground #11131a.

Beekeeper's colour profile, which defaults to DD 66, had to pick these values
itself:

* the surfaces from the wallet: light #fdfdff (the same as background), dark
  #202226; onSurface #1c1b1f / #e5e2e1; onSurfaceVariant #45474f / #a7adb7;
* dark outline #8f9199 (5.07:1 on #202226) and dark outlineVariant #45474f,
  Material tones of DD 66's neutral variant.

Proposed: add surface, onSurface, onSurfaceVariant and the dark outline pair to
DD 66, each checked against 4.5:1 (text) or 3:1 (component boundaries), and
align the wallet's Color.kt with them.

Contrast ratios computed with the WCAG 2.1 relative-luminance formula; DD 66 as
of taler-docs ee1e172c, the wallet as of taler-android 4c483527.
TagsNo tags attached.
Attached Files
dd66-surfaces-outlines-containers.patch (14,500 bytes)   
--- a/design-documents/066-wallet-color-scheme.rst
+++ b/design-documents/066-wallet-color-scheme.rst
@@ -92,14 +92,15 @@
 
           <code>#d3deff</code> <div style="display:inline-block;width:14px;height:14px;
           background:#d3deff;border:1px solid #aaa;margin-left:6px;vertical-align:middle;"></div>
-     - 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
 
           <code>#00134a</code> <div style="display:inline-block;width:14px;height:14px;
           background:#00134a;border:1px solid #aaa;margin-left:6px;vertical-align:middle;"></div>
-     - Foreground for ``primaryContainer``
+     - Foreground for ``primaryContainer``: 13.14:1 on it
 
    * - darkPrimary
      - .. raw:: html
@@ -120,14 +121,14 @@
 
           <code>#0042b3</code> <div style="display:inline-block;width:14px;height:14px;
           background:#0042b3;border:1px solid #aaa;margin-left:6px;vertical-align:middle;"></div>
-     - Container in dark mode
+     - Container in dark mode (about tone 30)
 
    * - darkOnPrimaryContainer
      - .. raw:: html
 
           <code>#e5ebff</code> <div style="display:inline-block;width:14px;height:14px;
           background:#e5ebff;border:1px solid #aaa;margin-left:6px;vertical-align:middle;"></div>
-     - Foreground on container in dark
+     - Foreground on container in dark: 7.27:1 on ``darkPrimaryContainer``
 
 
 
@@ -164,17 +165,16 @@
      - .. raw:: html
 
           <code>#d9e3f9</code> <div style="display:inline-block;width:14px;height:14px;
-          background:#d9e3f9;border:1px solid #aaa;margin-left:6px;
-          vertical-align:middle;"></div>
-     - Background for secondary surfaces
+          background:#d9e3f9;border:1px solid #aaa;margin-left:6px;vertical-align:middle;"></div>
+     - 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
 
           <code>#111c2b</code> <div style="display:inline-block;width:14px;height:14px;
-          background:#111c2b;border:1px solid #aaa;margin-left:6px;
-          vertical-align:middle;"></div>
-     - Foreground on ``secondaryContainer``
+          background:#111c2b;border:1px solid #aaa;margin-left:6px;vertical-align:middle;"></div>
+     - Foreground on ``secondaryContainer``: 13.31:1 on it
 
    * - darkSecondary
      - .. raw:: html
@@ -195,18 +195,19 @@
    * - darkSecondaryContainer
      - .. raw:: html
 
-          <code>#72a3e5</code> <div style="display:inline-block;width:14px;height:14px;
-          background:#72a3e5;border:1px solid #aaa;margin-left:6px;
-          vertical-align:middle;"></div>
-     - Background container in dark
+          <code>#414659</code> <div style="display:inline-block;width:14px;height:14px;
+          background:#414659;border:1px solid #aaa;margin-left:6px;vertical-align:middle;"></div>
+     - 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
 
-          <code>#003869</code> <div style="display:inline-block;width:14px;height:14px;
-          background:#003869;border:1px solid #aaa;margin-left:6px;
-          vertical-align:middle;"></div>
-     - Foreground for container in dark
+          <code>#e3e2e9</code> <div style="display:inline-block;width:14px;height:14px;
+          background:#e3e2e9;border:1px solid #aaa;margin-left:6px;vertical-align:middle;"></div>
+     - Foreground for container in dark (tone 90): 7.27:1 on
+       ``darkSecondaryContainer``
 
 
 
@@ -366,14 +367,15 @@
 
           <code>#337a40</code> <div style="display:inline-block;width:14px;height:14px;
           background:#337a40;border:1px solid #aaa;margin-left:6px;vertical-align:middle;"></div>
-     - 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
 
           <code>#ffffff</code> <div style="display:inline-block;width:14px;height:14px;
           background:#ffffff;border:1px solid #aaa;margin-left:6px;vertical-align:middle;"></div>
-     - Foreground on success
+     - Foreground on success: 5.25:1 on ``success``
 
    * - successContainer
      - .. raw:: html
@@ -392,16 +394,19 @@
    * - darkSuccess
      - .. raw:: html
 
-          <code>#337a40</code> <div style="display:inline-block;width:14px;height:14px;
-          background:#337a40;border:1px solid #aaa;margin-left:6px;vertical-align:middle;"></div>
-     - Same in dark mode (stable tone)
+          <code>#81c784</code> <div style="display:inline-block;width:14px;height:14px;
+          background:#81c784;border:1px solid #aaa;margin-left:6px;vertical-align:middle;"></div>
+     - 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
 
-          <code>#ffffff</code> <div style="display:inline-block;width:14px;height:14px;
-          background:#ffffff;border:1px solid #aaa;margin-left:6px;vertical-align:middle;"></div>
-     - Foreground for dark mode
+          <code>#003912</code> <div style="display:inline-block;width:14px;height:14px;
+          background:#003912;border:1px solid #aaa;margin-left:6px;vertical-align:middle;"></div>
+     - 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
 
-          <code>#f99c06</code> <div style="display:inline-block;width:14px;height:14px;
-          background:#f99c06;border:1px solid #aaa;margin-left:6px;vertical-align:middle;"></div>
-     - Alert banners, passive warnings
+          <code>#875200</code> <div style="display:inline-block;width:14px;height:14px;
+          background:#875200;border:1px solid #aaa;margin-left:6px;vertical-align:middle;"></div>
+     - 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
 
-          <code>#000000</code> <div style="display:inline-block;width:14px;height:14px;
-          background:#000000;border:1px solid #aaa;margin-left:6px;vertical-align:middle;"></div>
-     - Foreground text on warning
+          <code>#ffffff</code> <div style="display:inline-block;width:14px;height:14px;
+          background:#ffffff;border:1px solid #aaa;margin-left:6px;vertical-align:middle;"></div>
+     - Foreground text on warning: 6.49:1 on ``warning``. Was ``#000000``, for
+       ``#f99c06``
 
    * - warningContainer
      - .. raw:: html
@@ -462,14 +471,15 @@
 
           <code>#f99c06</code> <div style="display:inline-block;width:14px;height:14px;
           background:#f99c06;border:1px solid #aaa;margin-left:6px;vertical-align:middle;"></div>
-     - Warning in dark mode
+     - Warning in dark mode, also as text: 8.65:1 on ``darkBackground``, 7.42:1
+       on ``darkSurface``
 
    * - darkOnWarning
      - .. raw:: html
 
           <code>#000000</code> <div style="display:inline-block;width:14px;height:14px;
           background:#000000;border:1px solid #aaa;margin-left:6px;vertical-align:middle;"></div>
-     - 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
+
+          <code>#f0f0f4</code> <div style="display:inline-block;width:14px;height:14px;
+          background:#f0f0f4;border:1px solid #aaa;margin-left:6px;vertical-align:middle;"></div>
+     - 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
+
+          <code>#1c1b1f</code> <div style="display:inline-block;width:14px;height:14px;
+          background:#1c1b1f;border:1px solid #aaa;margin-left:6px;vertical-align:middle;"></div>
+     - Text/icons on ``surface``: 15.07:1 on it
+
+   * - onSurfaceVariant
+     - .. raw:: html
+
+          <code>#45474f</code> <div style="display:inline-block;width:14px;height:14px;
+          background:#45474f;border:1px solid #aaa;margin-left:6px;vertical-align:middle;"></div>
+     - Quieter text on ``surface`` and ``background``, such as hints and help:
+       8.15:1 on ``surface``, 9.12:1 on ``background``
+
+   * - darkSurface
+     - .. raw:: html
+
+          <code>#202226</code> <div style="display:inline-block;width:14px;height:14px;
+          background:#202226;border:1px solid #aaa;margin-left:6px;vertical-align:middle;"></div>
+     - Surface in dark mode: 1.16:1 against ``darkBackground``
+
+   * - darkOnSurface
+     - .. raw:: html
+
+          <code>#e5e2e1</code> <div style="display:inline-block;width:14px;height:14px;
+          background:#e5e2e1;border:1px solid #aaa;margin-left:6px;vertical-align:middle;"></div>
+     - Text/icons on ``darkSurface``: 12.36:1 on it
+
+   * - darkOnSurfaceVariant
+     - .. raw:: html
+
+          <code>#a7adb7</code> <div style="display:inline-block;width:14px;height:14px;
+          background:#a7adb7;border:1px solid #aaa;margin-left:6px;vertical-align:middle;"></div>
+     - Quieter text in dark mode: 7.06:1 on ``darkSurface``, 8.22:1 on
+       ``darkBackground``
+
+
 Outline
 ^^^^^^^
 
@@ -542,16 +615,118 @@
 
           <code>#767880</code> <div style="display:inline-block;width:14px;height:14px;
           background:#767880;border:1px solid #aaa;margin-left:6px;vertical-align:middle;"></div>
-     - 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
 
           <code>#c4c6d0</code> <div style="display:inline-block;width:14px;height:14px;
           background:#c4c6d0;border:1px solid #aaa;margin-left:6px;vertical-align:middle;"></div>
-     - Decorative borders, dividers
+     - Decorative borders, dividers, the borders of cards (no contrast
+       requirement: they do not identify a control)
+
+   * - darkOutline
+     - .. raw:: html
+
+          <code>#8f9199</code> <div style="display:inline-block;width:14px;height:14px;
+          background:#8f9199;border:1px solid #aaa;margin-left:6px;vertical-align:middle;"></div>
+     - 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
 
+          <code>#45474f</code> <div style="display:inline-block;width:14px;height:14px;
+          background:#45474f;border:1px solid #aaa;margin-left:6px;vertical-align:middle;"></div>
+     - 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
 ------------------

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

bot-cg [agent]

2026-11-19 23:34

updater   ~0030655

A clearer statement of the problem, and a patch.

**The problem.** DD 66 defines `background` and `onBackground`, but none of
the roles that Material 3 components draw on top of the background: cards,
sheets, dialogs, menus and text fields take `surface`, their text `onSurface`,
quieter text (hints, help) `onSurfaceVariant`. Its Outline section gives only
the light values (`#767880`, `#c4c6d0`), although `outline` is the border of
every text field and outlined button. So every implementation of DD 66 has to
invent these values, and the ones invented so far differ and partly fail
WCAG 2.1 AA:

| Value | Where | Ratio | Needed |
|---|---|---|---|
| outlineDark `#35383E` | Android wallet, field border on surfaceDark `#202226` | 1.36:1 | 3:1 (1.4.11) |
| outlineDark `#35383E` | on backgroundDark `#18191D` | 1.49:1 | 3:1 |
| outlineVariantDark `#566997` | on surfaceDark `#202226` | 2.93:1 | (decorative) |

The wallet's variant is the stronger of its two outlines, which is the wrong
way round (in Material 3, `outline` is the stronger one). The wallet's
backgroundDark `#18191D` also differs from DD 66's `#11131a`.

**Who is affected.** The Android wallet (its `Color.kt` fills the gaps itself),
the iOS wallet and the WebExtension, which need the same roles for dark mode
and for "complete semantic-token adoption" (DD 66's Definition of Done), and
Beekeeper, whose colour profile defaults to DD 66 for its web app and its
Android and iOS apps, and had to choose these values itself.

**What the patch changes.**

- A new **Surface** section with surface, onSurface and onSurfaceVariant,
  light and dark:

  | Role | Light | Dark | Contrast |
  |---|---|---|---|
  | surface | `#f0f0f4` | `#202226` | 1.12:1 / 1.16:1 against background |
  | onSurface | `#1c1b1f` | `#e5e2e1` | 15.07:1 / 12.36:1 on surface |
  | onSurfaceVariant | `#45474f` | `#a7adb7` | 8.15:1 / 7.06:1 on surface |

  The dark surface and both on-colours are the Android wallet's. The light
  surface is new: the wallet uses `#fdfdff`, the same as the background, so a
  card is set off only by a border or a shadow. `#f0f0f4` is tone 95 of DD 66's
  neutral palette (the hue and chroma of its onBackground), which sets cards
  off by their own tone and keeps every text colour above 4.5:1 on it (the
  closest is success, 4.62:1). If the wallet prefers to keep `#fdfdff`, the
  rest of the patch does not depend on it.
- **darkOutline `#8f9199`** and **darkOutlineVariant `#45474f`**: tones 60 and
  30 of DD 66's neutral variant palette, whose light outlines are tones 50 and
  80. darkOutline has 5.07:1 on the dark surface and 5.90:1 on the dark
  background.
- **darkSecondaryContainer `#414659`** and **darkOnSecondaryContainer
  `#e3e2e9`** (the wallet's values, tones 30 and 90, 7.27:1) instead of
  `#72a3e5` and `0003869`: `#72a3e5` is tone 66, a light fill in the dark
  scheme (it is where Material 3 draws a progress bar's track, a selected chip
  or a navigation indicator), and its text reaches only 4.57:1. The other
  containers stay; their rows now say what uses them and their contrast
  (13.14:1, 7.27:1, 13.31:1).
- The usage column of outline, outlineVariant and the containers says what
  draws with them and the contrast against what they sit on.
- A **Contrast** section that lists every pair (each on-colour on its colour,
  and primary, secondary, error, success and warning as text on background and
  surface), towards the Definition of Done item "WCAG 2.1 AA contrast
  verified". It also records one pair that the patch leaves alone: onTertiary
  `#ffffff` on tertiary `#338af0`, 3.48:1, enough for icons and large text but
  not for body text.

The success and warning changes in the same patch are those of 0012223.

**Beekeeper's state.** Beekeeper's colour profile is to use these values as
its defaults (the change is not in Beekeeper's master yet), and its manual will
list for each value whether it is DD 66's, the wallet's or derived. A designer
has yet to confirm them; if DD 66 settles on other values, Beekeeper follows.

The patch (attached, against taler-docs e7d7657c, where `git apply --check`
passes) covers this issue and 0012223.

Issue History

Date ModifiedUsernameFieldChange
2026-11-18 21:06bot-cgNew Issue
2026-11-18 21:06bot-cgImplementer => Alexis_Lafargue
2026-11-18 21:06bot-cgReviewer => Amoui NGoran
2026-11-18 21:06bot-cgRelease signed by => Antoine A
2026-11-18 21:06bot-cgDeployed by => Alexis_Lafargue
2026-11-18 21:06bot-cgVerifier => Alexis_Lafargue
2026-11-18 21:06bot-cgCommunicator => CM_7
2026-11-19 07:08Christian GrothoffImplementerAlexis_Lafargue => vlada.svirsh
2026-11-19 07:08Christian GrothoffReviewerAmoui NGoran => avalos
2026-11-19 07:08Christian GrothoffRelease signed byAntoine A => avalos
2026-11-19 07:08Christian GrothoffDeployed byAlexis_Lafargue => avalos
2026-11-19 07:08Christian GrothoffVerifierAlexis_Lafargue => vlada.svirsh
2026-11-19 07:08Christian GrothoffPrioritynormal => low
2026-11-19 07:08Christian GrothoffSeverityminor => tweak
2026-11-19 07:08Christian GrothoffStatusnew => implementing
2026-11-19 07:08Christian GrothoffTarget Version => 1.8
2026-11-19 23:34bot-cgFile Added: dd66-surfaces-outlines-containers.patch
2026-11-19 23:34bot-cgNote Added: 0030655
2026-11-21 22:44Christian GrothoffSeveritytweak => text