Skip to content

@angular/pwa: Consider necessity of defaulting to the specific theme-color #1976d2 #30336

Closed

Description

@Yves-X

Command

add

Description

When running ng add @angular/pwa to set up the Angular service worker, Angular CLI automatically adds a <meta name="theme-color" content="#1976d2"> tag to index.html.

The choice of this specific color (#1976d2) seems pointless. Is there a particular reason for this default?

Additionally, this behavior feels inconsistent with Angular CLI's typical approach of generating neutral templates. For instance, the CLI doesn't set a default lang attribute in HTML and expect developers to modify it; instead, it leaves this tag unset by default.

Describe the solution you'd like

I’d suggest one of the following:

  • Remove the default <meta name="theme-color"> from the schematic.
  • Replace the color with a neutral default.
  • Make the additional option via a prompt when running ng add @angular/pwa.

Describe alternatives you've considered

Developers can manually change or remove the tag when reviewing changes or after noticing unexpected UI coloring.
However, since theme-color affects the browser UI rather than visible page elements, it can be difficult for less experienced developers to pick the color and trace its source.

Activity

  1. added
    freq1: low
    on May 19, 2025
  2. added theissue type on May 19, 2025
  3. added 2 commits that reference this issue on May 19, 2025
    68d0826
    5ff05ea
  4. added 3 commits that reference this issue on May 19, 2025
    7a21deb
    ad2fb29
    5b43174
  5. angular-automatic-lock-bot commented on Jun 19, 2025

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  6. locked and limited conversation to collaborators on Jun 19, 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

    area: @angular/pwafreq1: lowseverity1: confusingtype: bug/fix

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions