
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.
themeparkVia NPM:
npm install hueman
NodeJS
// CJS syntax
var { hueman, mix, correction } = require('hueman');
// ES6 Syntax
import { hueman, mix, correction } from 'hueman';
Script tag (via unpkg):
<!-- Available as global variable hueman -->
<script src="https://unpkg.com/hueman"></script>
<!-- Later -->
<script>
console.log(hueman(120,1.0,0.5)); // "hsl(120,97%,37.5%)"
console.log(hueman.mix(120,160,0.75)); // "150"
console.log(hueman.correction(120)); // "[0.97, 0.75]"
</script>
Browser: Module (via snowpack):
import { hueman, mix, correction } from 'https://cdn.skypack.dev/hueman';
hueman(h,s,l,a)h: [0,360] (values will automatically wrap if outside of this range)s: [0.0,1.0] (defaults to 1.0)l: [0.0,1.0] (defaults to 0.5)a: [0.0,1.0] (defaults to 1.0) import { hueman } from 'hueman';
hueman(210, 1.0, 0.5) // -> "hsl(210,100%,50%)"
hueman(110, 1.0, 0.5, 0.5) // -> "hsla(110,97%,37.5%,0.5)"
hueman(50, 1.0, 0.5) // -> "hsl(50,100%,37.5%)"
mix(hue1,hue2,ratio)Returns the mixed hue between hue1 and hue2 at a desired ratio, where ratio = 0 results in hue1, and ratio = 1 results in hue2. Will correctly wrap across 0/360 (both 0 and 360 are red in HSL)
import { mix } from 'hueman';
mix(100, 200, 0.5) // -> 150
mix(340, 100, 0.1) // -> 352
mix(0, 200, 0.75) // -> 240 (closer distance between 200 and 360 than 0 and 200)
correction(hue)Returns [chroma, lightness] correction coefficient compared to base hue (210). Useful for calculating opacity for transparent overlays and other indirect hue-influenced calculations.
import { correction } from 'hueman';
// correction(h,s,l) => [chroma, lightness]
correction(0) // [0.9, 1] (reduce chroma, don't alter lightness)
correction(120) // [0.97, 0.75] (slightly reduce chroma, reduce lightness)
correction(240) // [0.97, 1.27]
correction(240,0.2,0.2) // [ 0.9976, 1.0216 ] (reduced effect since hue is less vibrant)
MIT © Marshall Brandt
FAQs
Color space based on human perception
We found that hueman 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.