@kszongic/color-convert-cli
v1.0.0
Published
Convert colors between hex, rgb, and hsl from the CLI. Zero dependencies.
Maintainers
Readme
color-convert-cli
Convert colors between hex, rgb, and hsl from the command line. Zero dependencies.
Install
npm i -g color-convert-cliOr use directly with npx:
npx color-convert-cli "#ff5733"Usage
# Show all formats
color-convert-cli "#ff5733"
# HEX: #ff5733
# RGB: rgb(255, 87, 51)
# HSL: hsl(11, 100%, 60%)
# Convert to a specific format
color-convert-cli "rgb(255,87,51)" --to hsl
# hsl(11, 100%, 60%)
# Generate a random color
color-convert-cli --random
color-convert-cli --random --to hexSupported Formats
| Input | Example |
|-------|---------|
| Hex | #ff5733, ff5733, #f53 |
| RGB | rgb(255, 87, 51) |
| HSL | hsl(11, 100%, 60%) |
License
MIT © kszongic
