Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
material-colors
Advanced tools
The material-colors npm package provides a collection of colors based on Google's Material Design color palette. It allows developers to easily access and use the color palette in their web projects, ensuring a consistent and visually appealing design that adheres to Material Design principles.
Accessing a specific color
This feature allows you to access a specific color within the Material Design palette by specifying the color name and its shade. The example demonstrates how to access the red color with a shade of 500.
"const materialColors = require('material-colors');
console.log(materialColors.red['500']); // Outputs the hex value for Material Design's red 500"
Getting a random color
This feature enables you to get a random color from the Material Design palette. The code sample shows how to select a random color by generating a random index and accessing the color at that index.
"const materialColors = require('material-colors');
const allColors = Object.values(materialColors);
const randomColor = allColors[Math.floor(Math.random() * allColors.length)];
console.log(randomColor);"
Open-color is a color scheme optimized for UI design and hand-picked by designers. While it is not specifically based on Material Design, it offers a similar functionality by providing a curated set of colors that can be easily integrated into web projects. It differs from material-colors by offering a unique color palette not tied to Material Design.
Colors from Google's Material Design made available to coders.
The colors are scraped from the guide. The idea to publish colors in multiple forms is stolen from mrmrs/colors.
.color-red-100
, .bg-red-100
, .border-red-100
, .fill-red-100
and .stroke-red-100
.--md-red-100
.$md-red-100
.@md-red-100
.md-red-100
.deep-purple
materialColor
. Key names are camelCase. e.g. deepPurple
See dist directory or demo for more details.
Download what you like from dist directory and use it.
bower install material-colors
and use what you like in bower_components/material-colors/dist
.
npm install material-colors
FAQs
Colors of Google's Material Design made available to coders
The npm package material-colors receives a total of 1,085,265 weekly downloads. As such, material-colors popularity was classified as popular.
We found that material-colors demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.