Create palette of your resuable colors, test how they look in console and reuse them later.
Install collo
as a global dependency to use it from every directory in your console.
yarn global add collo-cli
collo
is CLI tool to store, test and modify your color palette. Easy way to keep all of used by you colors in one place, to edit them easily or just to always have nice default palette near you. collo
tries to be as handy and easy as possible.
After installation you can run pre-installed binaries as simple command collo-cli
.
Nevertheless, collo
is not only a CLI tool—it gots a few built-in methods
to allow you work with it in your projects.
Path to your color palette. collo
uses conf under the hood to store data; collo.path
is just a shortcut for collo.config.path
.
Lists name—value pairs from collo.config.get('colors')
. collo
uses Node's console.table()
to print them in a table.
If there's no color palette—collo
will set defaults from ./colorPalette
:
const colorPalette = {
black: '#010101',
white: '#FEFEFE',
gray: '#778899',
silver: '#DDDDDD',
gold: '#FFDC00',
red: '#DC143C',
turquoise: '#00CED1',
teal: '#008080',
green: '#3CB371',
blue: '#4169E1',
pink: '#FFB6C1'
}
Edit color which already exists in palette.
Accepts name
as a string
and new value has to be in HEX format and match RegEx
pattern /^\#[0-9a-zA-Z]{6}/
(hash sign #
followed by six characters from 0-9 and a-zA-Z).
collo.edit('pink', '#FFC6C1')
Add new color to palette.
Accepts name
as a string
and new value has to be in HEX format and match RegEx
pattern /^\#[0-9a-zA-Z]{6}/
(hash sign #
followed by six characters from 0-9 and a-zA-Z).
collo.add('react', '#00d8ff')
Delete color from palette.
Accepts only string
matching one of the names in existing palette.
collo.delete('pink')
If you have any ideas and will to work with me in this project—you are kindly welcome!
In your default destination clone repository and install dependencies. Next you should get to know our API.
git clone https://github.com/robertgrzonka/collo.git
cd collo
yarn
- TypeScript definitions
- Jest tests
- binaries
Thanks goes to these wonderful people (emoji key):
robertgrzonka 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!
MIT © robertgrzonka