From 54d9dfeea50abcef13e55bd315121cbe4626e161 Mon Sep 17 00:00:00 2001 From: l-nmch Date: Sun, 8 Nov 2026 01:08:21 +0100 Subject: [PATCH] all/brand: Add the console status colors and neutral scale to the brand guide The console shows the state of resources, which the brand guide had no colors for. Add the status colors (success, warning, danger, in progress, idle), the three levels of text, the second neutral, the line and the border of a control, with their contrast ratios in both themes, and copy the tokens to brand/tokens.css. --- brand/tokens.css | 77 ++++++++++++++++++++++++++++++++++- docs/reference/brand-guide.md | 40 +++++++++++++++++- 2 files changed, 115 insertions(+), 2 deletions(-) diff --git a/brand/tokens.css b/brand/tokens.css index 9091e29..ef391e0 100644 --- a/brand/tokens.css +++ b/brand/tokens.css @@ -1,31 +1,82 @@ /* - * Phorge brand tokens. Values and contrast ratios: docs/reference/brand-guide.md. + * Phorge tokens. Values and contrast ratios: docs/reference/brand-guide.md. + * The base is the brand (background, surface, text, primary, accent, logo). The rest was added for the console: a finer neutral + * scale, three levels of text, the border of a control, and the status colors (success, warning, danger, in progress, idle), each + * as a text color, a tint and a dot. Contrast is WCAG AA: text 4.5:1 on the background and on its tint, controls and dots 3:1. * Light by default; dark follows the system, and data-theme="light" or "dark" on the root element forces one. */ :root { --phorge-bg: #ffffff; --phorge-surface: #f6f7fa; + --phorge-surface-2: #eceff3; --phorge-highlight: #ecf5fd; --phorge-text: #181c21; --phorge-text-muted: #30363b; + --phorge-text-2: #444d58; + --phorge-text-3: #5a6470; + --phorge-line: #e3e6eb; + --phorge-control: #7a838e; --phorge-primary: #0475b5; + --phorge-primary-hover: #035f94; --phorge-on-primary: #ffffff; --phorge-accent: #0593e4; --phorge-wordmark-gray: #767676; --phorge-logo-blue: #39b5fb; + + --phorge-success-fg: #14673a; + --phorge-success-bg: #e6f5ec; + --phorge-success-dot: #1f9d57; + --phorge-warning-fg: #7d4a00; + --phorge-warning-bg: #fdf1dc; + --phorge-warning-dot: #b87000; + --phorge-danger-fg: #a82217; + --phorge-danger-bg: #fdebe9; + --phorge-danger-dot: #d03a2e; + --phorge-progress-fg: #04639b; + --phorge-progress-bg: #e5f1fb; + --phorge-progress-dot: #0584cd; + --phorge-idle-fg: #444d58; + --phorge-idle-bg: #eceff3; + --phorge-idle-dot: #7a838e; + + --phorge-shadow-pop: 0 8px 24px rgb(24 28 33 / 0.12), 0 1px 3px rgb(24 28 33 / 0.08); } @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --phorge-bg: #1b1f23; --phorge-surface: #14171a; + --phorge-surface-2: #252b31; --phorge-highlight: #1e2226; --phorge-text: #d0d5da; --phorge-text-muted: #bcc3cb; + --phorge-text-2: #b0b8c1; + --phorge-text-3: #98a1ab; + --phorge-line: #2c333a; + --phorge-control: #6d7782; --phorge-primary: #39b5fb; + --phorge-primary-hover: #6cc7fc; --phorge-on-primary: #01050a; --phorge-accent: #39b5fb; --phorge-wordmark-gray: #a6a6a6; + + --phorge-success-fg: #6fd79a; + --phorge-success-bg: #133323; + --phorge-success-dot: #3fb878; + --phorge-warning-fg: #f2bc57; + --phorge-warning-bg: #3a2b0c; + --phorge-warning-dot: #e2a02b; + --phorge-danger-fg: #ff9a90; + --phorge-danger-bg: #3f1815; + --phorge-danger-dot: #f0645a; + --phorge-progress-fg: #6cc7fc; + --phorge-progress-bg: #0f2d42; + --phorge-progress-dot: #39b5fb; + --phorge-idle-fg: #b0b8c1; + --phorge-idle-bg: #252b31; + --phorge-idle-dot: #8a949f; + + --phorge-shadow-pop: 0 8px 24px rgb(0 0 0 / 0.5), 0 1px 3px rgb(0 0 0 / 0.4); color-scheme: dark; } } @@ -33,12 +84,36 @@ :root[data-theme="dark"] { --phorge-bg: #1b1f23; --phorge-surface: #14171a; + --phorge-surface-2: #252b31; --phorge-highlight: #1e2226; --phorge-text: #d0d5da; --phorge-text-muted: #bcc3cb; + --phorge-text-2: #b0b8c1; + --phorge-text-3: #98a1ab; + --phorge-line: #2c333a; + --phorge-control: #6d7782; --phorge-primary: #39b5fb; + --phorge-primary-hover: #6cc7fc; --phorge-on-primary: #01050a; --phorge-accent: #39b5fb; --phorge-wordmark-gray: #a6a6a6; + + --phorge-success-fg: #6fd79a; + --phorge-success-bg: #133323; + --phorge-success-dot: #3fb878; + --phorge-warning-fg: #f2bc57; + --phorge-warning-bg: #3a2b0c; + --phorge-warning-dot: #e2a02b; + --phorge-danger-fg: #ff9a90; + --phorge-danger-bg: #3f1815; + --phorge-danger-dot: #f0645a; + --phorge-progress-fg: #6cc7fc; + --phorge-progress-bg: #0f2d42; + --phorge-progress-dot: #39b5fb; + --phorge-idle-fg: #b0b8c1; + --phorge-idle-bg: #252b31; + --phorge-idle-dot: #8a949f; + + --phorge-shadow-pop: 0 8px 24px rgb(0 0 0 / 0.5), 0 1px 3px rgb(0 0 0 / 0.4); color-scheme: dark; } diff --git a/docs/reference/brand-guide.md b/docs/reference/brand-guide.md index 5a42f2c..5dd15d8 100644 --- a/docs/reference/brand-guide.md +++ b/docs/reference/brand-guide.md @@ -1,7 +1,7 @@ --- type: reference audience: contributor who writes text, builds an interface or makes a visual for Phorge -verified: 2026-11-05 +verified: 2026-11-08 --- # Brand guide @@ -43,10 +43,16 @@ The logo blue, `#39b5fb`, is 2.3:1 on white. It is used as a color for text, lin | --- | --- | --- | --- | | `--phorge-bg` | `#ffffff` | Page background | | | `--phorge-surface` | `#f6f7fa` | Navigation, panels | | +| `--phorge-surface-2` | `#eceff3` | Hover and selected rows, the current item of the navigation | | | `--phorge-highlight` | `#ecf5fd` | Selected rows | | | `--phorge-text` | `#181c21` | Body text | 17.1:1 on bg, 16.0:1 on surface | | `--phorge-text-muted` | `#30363b` | Secondary text | 12.2:1 on bg, 11.1:1 on highlight | +| `--phorge-text-2` | `#444d58` | Secondary text in the console | 8.6:1 on bg, 8.0:1 on surface, 7.4:1 on surface-2 | +| `--phorge-text-3` | `#5a6470` | Help text, placeholders, units | 6.0:1 on bg, 5.6:1 on surface, 5.2:1 on surface-2 | +| `--phorge-line` | `#e3e6eb` | Hairlines between rows and around panels | Decoration, no minimum | +| `--phorge-control` | `#7a838e` | The border of a field or a button | 3.8:1 on bg, 3.6:1 on surface | | `--phorge-primary` | `#0475b5` | Links, button fill | 5.0:1 on bg, 4.7:1 on surface, 4.5:1 on highlight | +| `--phorge-primary-hover` | `#035f94` | The main button under the pointer | 6.8:1 on bg, 6.8:1 with on-primary | | `--phorge-on-primary` | `#ffffff` | Text on a primary fill | 5.0:1 on primary | | `--phorge-accent` | `#0593e4` | Borders, icons, focus rings | 3.3:1 on bg, 3.1:1 on surface, 3.0:1 on highlight | | `--phorge-wordmark-gray` | `#767676` | The letters "orge" | 4.5:1 on bg | @@ -57,16 +63,48 @@ The logo blue, `#39b5fb`, is 2.3:1 on white. It is used as a color for text, lin | --- | --- | --- | --- | | `--phorge-bg` | `#1b1f23` | Page background | | | `--phorge-surface` | `#14171a` | Navigation, panels | | +| `--phorge-surface-2` | `#252b31` | Hover and selected rows, the current item of the navigation | | | `--phorge-highlight` | `#1e2226` | Selected rows | | | `--phorge-text` | `#d0d5da` | Body text | 11.2:1 on bg, 12.2:1 on surface | | `--phorge-text-muted` | `#bcc3cb` | Secondary text | 9.3:1 on bg, 9.0:1 on highlight | +| `--phorge-text-2` | `#b0b8c1` | Secondary text in the console | 8.3:1 on bg, 9.0:1 on surface, 7.1:1 on surface-2 | +| `--phorge-text-3` | `#98a1ab` | Help text, placeholders, units | 6.3:1 on bg, 6.9:1 on surface, 5.5:1 on surface-2 | +| `--phorge-line` | `#2c333a` | Hairlines between rows and around panels | Decoration, no minimum | +| `--phorge-control` | `#6d7782` | The border of a field or a button | 3.6:1 on bg, 4.0:1 on surface | | `--phorge-primary` | `#39b5fb` | Links, button fill | 7.2:1 on bg, 7.9:1 on surface, 7.0:1 on highlight | +| `--phorge-primary-hover` | `#6cc7fc` | The main button under the pointer | 8.9:1 on bg, 10.9:1 with on-primary | | `--phorge-on-primary` | `#01050a` | Text on a primary fill | 8.9:1 on primary | | `--phorge-accent` | `#39b5fb` | Borders, icons, focus rings | 7.2:1 on bg | | `--phorge-wordmark-gray` | `#a6a6a6` | The letters "orge" | 6.8:1 on bg | Ratios are the WCAG 2 contrast ratio, computed from the hex values and rounded to one decimal. Body text needs 4.5:1 and large text, icons and borders need 3:1. The text of a logo has no minimum, and the wordmark gray still meets 4.5:1 on white. +### Status colors + +A state is shown with a text color, a tint behind it and a dot (or a border), and is always written and drawn with an icon: a color never carries the meaning alone. The tokens are in [brand/tokens.css](../../brand/tokens.css). A color means one thing everywhere: success (`Ready`, running), warning, danger (`Failed`), in progress (`Provisioning`, starting, stopping) and idle (stopped, being deleted). + +Light theme: + +| Status | Text | Tint | Dot | Text on tint | Text on bg | Dot on bg | +| --- | --- | --- | --- | --- | --- | --- | +| Success | `--phorge-success-fg` `#14673a` | `--phorge-success-bg` `#e6f5ec` | `--phorge-success-dot` `#1f9d57` | 6.1:1 | 6.9:1 | 3.5:1 | +| Warning | `--phorge-warning-fg` `#7d4a00` | `--phorge-warning-bg` `#fdf1dc` | `--phorge-warning-dot` `#b87000` | 6.6:1 | 7.4:1 | 3.9:1 | +| Danger | `--phorge-danger-fg` `#a82217` | `--phorge-danger-bg` `#fdebe9` | `--phorge-danger-dot` `#d03a2e` | 6.3:1 | 7.2:1 | 4.9:1 | +| In progress | `--phorge-progress-fg` `#04639b` | `--phorge-progress-bg` `#e5f1fb` | `--phorge-progress-dot` `#0584cd` | 5.6:1 | 6.4:1 | 4.0:1 | +| Idle | `--phorge-idle-fg` `#444d58` | `--phorge-idle-bg` `#eceff3` | `--phorge-idle-dot` `#7a838e` | 7.4:1 | 8.6:1 | 3.8:1 | + +Dark theme: + +| Status | Text | Tint | Dot | Text on tint | Text on bg | Dot on bg | +| --- | --- | --- | --- | --- | --- | --- | +| Success | `--phorge-success-fg` `#6fd79a` | `--phorge-success-bg` `#133323` | `--phorge-success-dot` `#3fb878` | 7.8:1 | 9.4:1 | 6.6:1 | +| Warning | `--phorge-warning-fg` `#f2bc57` | `--phorge-warning-bg` `#3a2b0c` | `--phorge-warning-dot` `#e2a02b` | 7.9:1 | 9.6:1 | 7.3:1 | +| Danger | `--phorge-danger-fg` `#ff9a90` | `--phorge-danger-bg` `#3f1815` | `--phorge-danger-dot` `#f0645a` | 7.6:1 | 8.1:1 | 5.3:1 | +| In progress | `--phorge-progress-fg` `#6cc7fc` | `--phorge-progress-bg` `#0f2d42` | `--phorge-progress-dot` `#39b5fb` | 7.6:1 | 8.9:1 | 7.2:1 | +| Idle | `--phorge-idle-fg` `#b0b8c1` | `--phorge-idle-bg` `#252b31` | `--phorge-idle-dot` `#8a949f` | 7.1:1 | 8.3:1 | 5.4:1 | + +The brand itself has no status colors: they exist for interfaces that show the state of a resource, like the console. The accent colors stay for actions, the current selection and focus. + ## Typography - **Typeface:** Source Sans 3, weights 400, 600 and 700, for the interface, the showcase site and the documents.