npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ngx-mat-grayscale-theme

v1.0.15

Published

A minimalist grayscale theme for Angular Material 20

Readme

🎨 ngx-mat-grayscale-theme

A minimalist grayscale theme for Angular Material 20 with professional gray tones and clean design without shadows.

✨ Features

  • 🎯 Professional gray tones without color accents
  • 🚫 No shadows - clean, flat design
  • 🔲 Subtle borders instead of shadows
  • 🌙 Light and dark themes with full support
  • High contrast versions for better accessibility
  • 🎛️ Complete theme switcher component
  • 🔧 Angular 20 compatibility

DEMO

alt text

📦 Installation

npm install ngx-mat-grayscale-theme

🚀 Usage in Angular 20 Application

1. Import Styles

In src/styles.scss:

// Import grayscale theme (replaces default Angular Material theme)
@import 'ngx-mat-grayscale-theme/ui-theme';

// Your custom global styles
html, body { height: 100%; }
body { margin: 0; font-family: Roboto, "Helvetica Neue", sans-serif; }

2. Configure Provider

In src/main.ts:

import { bootstrapApplication } from '@angular/platform-browser';
import { AppComponent } from './app/app.component';
import { provideGrayscaleTheme } from 'ngx-mat-grayscale-theme';
import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';

bootstrapApplication(AppComponent, {
  providers: [
    provideAnimationsAsync(),
    provideGrayscaleTheme({
      defaultTheme: 'light',
      enableHighContrast: true,
      storageKey: 'grayscale-theme'
    })
  ]
}).catch(err => console.error(err));

3. Add Theme Toggle

In your component:

import { Component } from '@angular/core';
import { ThemeToggleComponent } from 'ngx-mat-grayscale-theme';

@Component({
  selector: 'app-root',
  standalone: true,
  imports: [ThemeToggleComponent],
  template: `
    <mat-toolbar>
      <span>My Application</span>
      <span class="spacer"></span>
      <mat-gray-theme-toggle></mat-gray-theme-toggle>
    </mat-toolbar>
  `
})
export class AppComponent {}

4. Using ThemeService

import { Component, inject } from '@angular/core';
import { ThemeService, Theme } from 'ngx-mat-grayscale-theme';

@Component({
  selector: 'app-example',
  template: `
    <p>Current theme: {{ themeService.getThemeLabel() }}</p>
    <button (click)="toggleTheme()">Toggle Theme</button>
  `
})
export class ExampleComponent {
  themeService = inject(ThemeService);

  toggleTheme() {
    this.themeService.toggleTheme();
  }

  setSpecificTheme() {
    this.themeService.setTheme('dark-high-contrast');
  }
}

🎛️ API Reference

ThemeService

| Method | Description | |--------|-------------| | getCurrentTheme() | Returns current theme | | setTheme(theme: Theme) | Sets specific theme | | toggleTheme() | Toggles between light and dark | | toggleHighContrast() | Toggles high contrast mode | | isDark() | Returns true if dark theme is active | | isLight() | Returns true if light theme is active | | isHighContrast() | Returns true if high contrast is active | | getThemeLabel() | Returns theme name label |

Available Themes

  • 'light' - Light theme
  • 'dark' - Dark theme
  • 'light-high-contrast' - Light with high contrast
  • 'dark-high-contrast' - Dark with high contrast

Provider Configuration

interface GrayscaleThemeConfig {
  defaultTheme?: 'light' | 'dark' | 'light-high-contrast' | 'dark-high-contrast';
  enableHighContrast?: boolean;
  storageKey?: string;
}

🎨 Design Principles

Colors

  • Primary palette: Professional gray tones
  • No color accents: Consistent grayscale design
  • High contrast: Optimized for accessibility

Styles

  • No shadows: All Material components have removed box-shadow
  • Subtle borders: 1px solid borders instead of shadows
  • Clean interface: Minimalist, professional appearance

🔧 Development

Requirements

  • Angular 20+
  • Angular Material 20+
  • TypeScript 5.8+

Building the Library

ng build ngx-mat-grayscale-theme

Demo Application

ng serve demo

📄 License

MIT

🤝 Contributing

Contributions are welcome! Please create an issue or pull request.

📞 Support

For questions and issues, please create an issue in the GitHub repository.