0.6.2 • Published 10 months ago

postcss-material-colors v0.6.2

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

postcss-material-colors. Inspired by tailwind-material-colors

A PostCSS plugin to use the Material Design 3 Color System with PostCSS.

usage

1.

npm install --save-dev postcss-material-colors
  1. in postcss config:
import theme from "postcss-material-colors"

...
  plugins: [
    theme({ darkModeStragety: "class" /* "class" (default) | "data" | "media" */ }),
    ...
  ],
...
  1. in css (usually your root file):
/* defaults for variant and contrast are shown */
@postcss-material-colors (primary: #ff0000, variant: tonalSpot, contrast: 0.0, green: #00ff00); /* add any extra colors you want */

!WARNING actual types look different

export interface ThemeOptions {
  primary: string; // hex
  variant?:
    | "content"
    | "expressive"
    | "fidelity"
    | "fruitSalad"
    | "monochrome"
    | "neutral"
    | "ranbow"
    | "tonalSpot"
    | "vibrant";
  contrast?: number; // between -1.0 and 1.0
  [key: string]: string; // hex (extra colors)
}

More about args

soon

  • extra colors
0.1.1-a

1 year ago

0.1.0

1 year ago

0.3.0

10 months ago

0.2.1

10 months ago

0.1.2

1 year ago

0.1.1

1 year ago

0.6.2

10 months ago

0.5.0

10 months ago

0.4.1

10 months ago

0.2.3

10 months ago

0.4.0

10 months ago

0.3.1

10 months ago

0.2.2

10 months ago

0.6.1

10 months ago

0.6.0

10 months ago

0.0.1

1 year ago

0.0.0

1 year ago