Skip to content

Allow custom colors for project namesΒ #6481

Closed

Description

@sheremet-va

Clear and concise description of the problem

It is not possible to configure colors of the project names in UI or in the CLI.

Suggested solution

Allow accepting the name property as an object:

interface ProjectName {
  name: string
  color: keyof Colors
}

We should also change the default colors to be background ones by default (this was initially part of #6329):
Screenshot 2024-08-12 at 23 03 51

Alternative

No response

Additional context

No response

Validations

Activity

  1. added
    p2-nice-to-have
    and removed on Sep 12, 2024
  2. moved this to Approved in Team Boardon Sep 12, 2024
  3. AriPerkkio commented on Sep 12, 2024

    @AriPerkkio
    Member

    Related to #6338

  4. kevinmarrec commented on Jan 19, 2025

    @kevinmarrec

    @sheremet-va Vitest should provide somehow at minimum 2 colorsets (until custom colors for project names come out), following an accessible dark/light theme convention, because when running Vitest with workspaces, either in a terminal with dark background or in Github Actions with dark background, it's not accessible (especially on Github actions) :

    Image

    Image

  5. rgrove commented on Jan 27, 2025

    @rgrove
    Contributor

    I was surprised to discover that in Vitest 3, project names are completely unreadable in my terminal with a dark color scheme. The big blank space on the left in the screenshot below is where (invisible) project names are printed. I've obscured the filenames on the right since this is a non-public codebase.

  6. kevinmarrec commented on Jan 27, 2025

    @kevinmarrec

    I think the first color picked is black :

    const colors = [c.black, c.yellow, c.cyan, c.green, c.magenta]

    @rgrove And I guess you're being pretty unlucky because your terminal background is exactly the same black color Vitest is using (from tinyrainbow library), so you don't see it at all 😡

  7. rgrove commented on Jan 27, 2025

    @rgrove
    Contributor

    Yeah, that looks like the problem! Seems like this issue with dark backgrounds could be mitigated by removing black from the list of possible colors?

  8. kevinmarrec commented on Jan 27, 2025

    @kevinmarrec

    I guess it could be indeed a first step before letting us customize the colors from the config options.

  9. locked and limited conversation to collaborators on May 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    p2-nice-to-have

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions