Files
wekan/docs/Features/Cards/Set-Color.md
T
Lauri Ojansivu 7e1f9e89eb Docs: every feature topic in one folder under docs/Features, each with README.md as its main page.
- The General/ level is gone: its 109 files moved up into the folders of the
  same name, and its topic table is the "Shared topics" section of
  Features.md.
- Accessibility is one folder, docs/Features/Accessibility/, with the Admin
  Panel's accessibility page in it.
- Every folder's main page is README.md (110 X/X.md pages renamed with git mv,
  five merged with an existing README.md, 26 index pages added for folders
  that had none), so a folder opened on GitHub shows its page.
- The 73 "# Moved" forwarding pages are deleted, with the folders that held
  only them; every link that went to one goes to its final page.
- docs/Features/README.md has the website's "Features in WeKan" overview,
  each feature linking to its page here.

1,129 Markdown links in 262 files and 352 doc paths in code, tests, compose,
snap and release files follow. tests/docsFeaturesLayout.test.cjs fails when
General/ or a "# Moved" page comes back, a folder has no README.md, or a
relative link in the docs or README.md does not resolve.

Thanks to xet7 !
2026-11-24 20:02:06 +02:00

6.6 KiB

Card menu / Set color

What it is

Set color gives one card a background colour of its own, so it stands out on the board: urgent work in red, a customer's cards in their colour, or any meaning the team agrees on. The colour is either one of WeKan's named colours or any custom colour picked from the colour wheel, and the card's text is made readable on it automatically.

Read more

How to use it

  1. Open the card and click the card menu (☰ in the opened card's header, Card Actions).
  2. Under Appearance, choose Set color. This opens the card's colour popup (setCardColorPopup in client/components/cards/cardDetails.jade).
  3. Click a colour of the palette, one of the custom swatches, or pick one under Custom color.
  4. Click Save. Remove takes the card's colour away.
Control What it does
Palette the named colours (ALLOWED_COLORS) except white; the current one has a check mark
Custom swatches the custom #rrggbb colours already used by cards of this board
Custom color the browser's colour wheel (#5514)
Save saves the chosen colour on the card
Remove removes the card's colour

Who sees it: somebody who may change the card (canModifyCard, which includes the card's list permission), and who is not a Worker.

Where it shows: on the minicard and in the opened card's header, unless Card color is turned off for that place in Board Settings / Card (allowsCardColorOnMinicard, allowsCardColorOnCard).

A card without a colour of its own can be shown in its list's colour; see List menu / Set Color. The card's own colour always wins.

Several cards can be coloured at once from Multi-Selection.

How the numbers are calculated

  • Palette: the 25 named colours of ALLOWED_COLORS in config/const.js less white, so 24 swatches. Choosing white, or Remove, stores no colour (setColor in models/cards.js writes null).
  • Custom swatches (customColorsInUse in models/lib/contrastColor.js): the #rrggbb colours of the board's non-archived cards, lower-cased, at most 12, the most used first and equal counts in the order first seen.
  • Colour wheel: opens at the card's current colour as hex, or #0079bf when it has none.
  • Text colour on a custom colour (contrastText): the background's WCAG relative luminance 0.2126 R + 0.7152 G + 0.0722 B (each channel linearized from sRGB); above 0.179 the text is black (#000000), otherwise white (#ffffff). 0.179 is where black and white text have the same contrast ratio.
  • Shown colour (effectiveCardColor in models/lib/cardDisplayColor.js): the card's own colour; else the list's colour when the list says so and it is not white; else none.

How it works in WeKan

Commits