JanselLopez Posted on Jan 13, 2024 Using Material's colors in javascript #material #javascript #npm Install npm i material-colors-utils Enter fullscreen mode Exit fullscreen mode Usage Get palette import { blue } from "material-colors-utils"; console.log({blue}) //{ // blue:{ // 50: "#E3F2FD", // 100: "#BBDEFB", // 200: "#90CAF9", // 300: "#64B5F6", // 400: "#42A5F5", // 500: "#2196F3", // 600: "#1E88E5", // 700: "#1976D2", // 800: "#1565C0", // 900: "#0D47A1", // A100: "#82B1FF", // A200: "#448AFF", // A400: "#2979FF", // A700: "#2962FF" // } //} Enter fullscreen mode Exit fullscreen mode Get color Example import { blue } from "material-colors-utils"; console.log(blue[500])//#2196F3 Enter fullscreen mode Exit fullscreen mode Doc material-colors-utils Top comments (0) Subscribe Personal Trusted User Create template Templates let you quickly answer FAQs or store snippets for re-use. Submit Preview Dismiss Code of Conduct • Report abuse Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink. Hide child comments as well Confirm For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)