
Research
/Security News
10 npm Typosquatted Packages Deploy Multi-Stage Credential Harvester
Socket researchers found 10 typosquatted npm packages that auto-run on install, show fake CAPTCHAs, fingerprint by IP, and deploy a credential stealer.
@fantasy-color/hcl-to-rgb
Advanced tools
Transform a HCL color object to a RGB color object.
type hclToRgb = (color: HCL) => RGB
Example usage:
import hclToRgb from '@fantasy-color/hcl-to-rgb'
hclToRgb({
hue: 40.85261277607024,
chroma: 106.83899941284552,
luminance: 54.29173376861782
})
// { red: 255, green: 0, blue: 0 }
Note that this transformation can yield results where the values of the colors are outside the 0-255 boundary. So for example, dark red:
import hclToRgb from '@fantasy-color/hcl-to-rgb'
hclToRgb({
hue: 40.85261277607024,
chroma: 106.83899941284552,
luminance: 24.29173376861782
})
// { red: 157, green: -147, blue: -70 }
…yields -147 for green and -70 for blue. These are valid CSS values:
Colors outside the sRGB gamut can be specified in Cascading Style Sheets by making one or more of the red, green and blue components negative or greater than 100%, so the color space is theoretically an unbounded extrapolation of sRGB similar to scRGB.
They will just get clipped to the range 0-255. The color specified above will be represented by the browser as:
const color = { red: 157, green: 0, blue: 0 }
FAQs
Transform HCL objects to RGB objects
The npm package @fantasy-color/hcl-to-rgb receives a total of 1 weekly downloads. As such, @fantasy-color/hcl-to-rgb popularity was classified as not popular.
We found that @fantasy-color/hcl-to-rgb demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 9 open source maintainers 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 researchers found 10 typosquatted npm packages that auto-run on install, show fake CAPTCHAs, fingerprint by IP, and deploy a credential stealer.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.