
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.
A javascript library to convert between various css colour formats.
Install niram using any of the command below
yarn add niramnpm install niramTo convert colours:
import { convertColor } from 'niram'
const color = convertColor('hsl(120deg, 100%, 25%)')
console.log(color)
Above code will log the converted colour details to console as:
{
"name": "green",
"decimal": 8388863,
"hex": "#008000",
"rgb": "rgb(0, 128, 0)",
"rgba": "rgba(0, 128, 0, 1)",
"hsl": "hsl(120deg, 100%, 25%)",
"hsla": "hsla(120deg, 100%, 25%, 1)",
"opacity": 1
}
To validate colours:
import { validateColor } from 'niram'
const isColorValid = validateColor('hwb(120deg 0% 50% / 1)')
console.log(isColorValid)
// Outputs: true
Following are the supported colour formats (given with example)
Colour Keywords - green
HEX - #008000 or #0f0
RGB - rgb(0, 128, 0) or rgb(0 128 0)
RGBA - rgba(0, 128, 0, 1) or rgba(0 128 0 / 1)
HSL* - hsl(120deg, 100%, 25%) or hsl(120deg 100% 25%)
HSLA* - hsla(120deg, 100%, 25%, 1) or hsla(120deg 100% 25% / 1)
HWB*# - hwb(120deg 0% 50% / 1)
LAB# - lab(46.23 -51.7 49.9 / 1)
LCH# - lch(46.28% 67.98 134.38 / 1)
* You can also use rad instead of deg
# Support is only available for Validation
Following are currently unsupported for conversion, but support will be added soon.
hwb()lab()lch()FAQs
A javascript library to convert between various css colour formats.
We found that niram demonstrated a healthy version release cadence and project activity because the last version was released less than 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.