Files
wekan/docs/Features/Cards/Set-Color.md
T
Lauri Ojansivu bfa0748518 Docs: Card features: what each feature is, how to use it, how its numbers are calculated, how it works, and its commits.
Scrum, Set color, Similar cards, Subtasks, Suggested members, Time
tracking, Watch and Star, Whiteboard, Cover image, Locations and Stickers
follow one structure. Corrected from the code: Filter: Subtasks is in the
Subtasks heading's hamburger, the whiteboard keeps the drawing's own size,
the card-field switches are in Admin Panel / Settings / Features, the map
links follow the chosen provider of eleven, Time tracking describes the
card's spent time and time by day, and Scrum now has native sprints.

Thanks to xet7 !
2026-11-22 18:30:01 +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