Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
@artprompt/material-color-utilities
Advanced tools
Algorithms and utilities that power the Material Design 3 (M3) color system, including choosing theme colors from images and creating tones of colors; all in a new color space.
Algorithms and utilities that power the Material Design 3 (M3) color system, including choosing theme colors from images and creating tones of colors; all in a new color space.
See the main README for more information.
npm i @material/material-color-utilities
or yarn add @material/material-color-utilities
import { HCT } from "@material/material-color-utilities";
// Simple demonstration of HCT.
const color = HCT.fromInt(0xff4285f4);
console.log(`Hue: ${color.hue}`);
console.log(`Chrome: ${color.chroma}`);
console.log(`Tone: ${color.tone}`);
import { argbFromHex, themeFromSourceColor, applyTheme } from "@material/material-color-utilities";
// Get the theme from a hex color
const theme = themeFromSourceColor(argbFromHex('#f82506'), [
{
name: "custom-1",
value: argbFromHex("#ff0000"),
blend: true,
},
]);
// Print out the theme as JSON
console.log(JSON.stringify(theme, null, 2));
// Check if the user has dark mode turned on
const systemDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
// Apply the theme to the body by updating custom properties for material tokens
applyTheme(theme, {target: document.body, dark: systemDark});
If using node make sure to use the following flag:
node --experimental-specifier-resolution=node
This repo is not accepting external contributions, but feature requests and bug reports are welcome on GitHub.
FAQs
Algorithms and utilities that power the Material Design 3 (M3) color system, including choosing theme colors from images and creating tones of colors; all in a new color space.
We found that @artprompt/material-color-utilities 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.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.