Package to replace
@img/colour
Suggested replacement(s)
another package: color
Manifest type
preferred (lighter or more modern alternative package)
Rationale
@img/colour is just a port of the color package to CommonJS. It is just better to switch back to color and use ESM, which allows for better tree-shaking.
Source:
This package converts the color package and its dependencies, all of which are MIT-licensed, to CommonJS.
Availability
No response
Code example (optional)
Before:
const Color = require('@img/colour')
const red = Color('red').hex()
After:
import Color from 'color'
const red = Color('red').hex()
Package to replace
@img/colour
Suggested replacement(s)
another package:
colorManifest type
preferred (lighter or more modern alternative package)
Rationale
@img/colouris just a port of thecolorpackage toCommonJS. It is just better to switch back tocolorand use ESM, which allows for better tree-shaking.Source:
Availability
No response
Code example (optional)
Before:
After: