ITADN

[Replacement]: `@img/colour`

#786OpenNorbiros 创建于 2026-07-07
accepted
N
Norbiroscommented
### 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](https://npmx.dev/package/@img/colour#user-content-imgcolour): > This package converts the color package and its dependencies, all of which are MIT-licensed, to CommonJS. ### Availability _No response_ ### Code example (optional) Before: ```js const Color = require('@img/colour') const red = Color('red').hex() ``` After: ```js import Color from 'color' const red = Color('red').hex() ```
5 条评论