Files
wekan/client/components/main/themeColorPicker.jade
T
Lauri Ojansivu 8b2114cd0f Themes: every board theme and every color a member chooses is readable.
Eight themes (nephritis, pumpkin, moderatepink, strongcyan, limegreen, relax,
corteza, modern) had white text on an accent at 2.1 to 4.3:1: their accents and
hover, selected and emphasis shades are darkened until it reads at 4.5:1. The
filter sidebar's headings, the clear themes' quiet text and cleanlight's
add-dependency link are darker. A color a member chooses is made legible: a
custom theme accent or slide end is darkened under the header's white text, the
text color is moved to read on the theme's surfaces and no longer reaches the
header, labels and primary buttons, a dependency line is drawn at 3:1, Kanri's
tag text is the better of dark and light, and a custom label, card, list or
swimlane color already derives its text. All 25 themes show no colour contrast
failure on the board, the sidebars, Card Settings, the card and its popups.

Thanks to Samunosuke and xet7 !
2026-11-03 12:37:10 +02:00

49 lines
2.4 KiB
Plaintext

//- Shared "Select Color" picker (docs/Features/General/Theme/Change-Color.md), used by Board Settings,
Member Settings and Admin Panel / Settings / Visibility. Colors are shown as VISIBLE swatches grouped by category, with
the category name as a header above each group; the native color wheel(s) appear
for the flat (1) / clear (2) categories once such a color is selected. `data.scope`
is 'board', 'global' or 'admin' - the only difference between the three places.
template(name="themeColorPicker")
form.theme-color-picker.edit-label
if isGlobal
//- Two switches on ONE row: what the theme IS on the start side, and where
it also applies on the end side. "Default (no override)" clears the
user's theme; "All Boards" paints the overview's tiles in the theme's
lighter colour instead of each board's own (models/users.js
profile.allBoardsThemeTiles). Only the user's own scope has the second
one - a site admin does not decide this for everybody.
ul.pop-over-list.theme-scope-row
li(class="{{#if isNoneSelected}}active{{/if}}")
a.js-theme-none
i.fa.fa-ban
| {{_ 'theme-default'}}
if isNoneSelected
i.fa.fa-check
if isUserScope
li(class="{{#if allBoardsTilesOn}}active{{/if}}")
a.js-theme-all-boards
i.fa.fa-th-large
| {{_ 'all-boards'}}
if allBoardsTilesOn
i.fa.fa-check
each themeGroups
.theme-category-group
.theme-category-label {{label}}
.board-backgrounds-list.clearfix
each colors
.board-background-select.js-select-theme(data-color="{{name}}")
span.background-box(class="board-color-{{name}}")
span {{name}}
if selected
i.fa.fa-check
if showCustom
.color-wheel-wrap
label {{_ 'custom-color'}}
each customWheels
input.js-theme-wheel(type="color" data-index="{{index}}" value="{{value}}" title="{{_ 'custom-color'}}")
.theme-preview
span.background-box(class="{{previewClass}}" style="{{previewStyle}}")
//- WCAG 1.4.3: a colour that white text cannot be read on is darkened; this says so.
if customAdjusted
p.theme-custom-adjusted.js-theme-custom-adjusted {{_ 'custom-color'}}: {{customAdjusted}} (4.5:1)