
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
lightordark
Advanced tools
npm install lightordark
在文件中引入:
var lightordark = require('lightordark');
获取亮度
lightordark.getLuminance('#cdf'); // 0.7177027204456372
获取对比度
lightordark.getContrast('#666', '#fff'); // 5.74183648145415
lightordark.getContrast(lightordark.mixColor('rgba(0,0,0,.6)', '#fff'), '#fff'); // 5.74183648145415
Alpha 混合 支持前景色半透明
lightordark.mixColor('rgba(0,0,0,.6)', '#fff'); // #666666
lightordark.mixColor('#666', '#fff'); // #666666
判断是浅色还是暗色 支持调节最小对比度
lightordark.contrast('#888'); // dark
lightordark.contrast('#888', 7); // light
FAQs
Determine if a color is light or dark
We found that lightordark 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.