1.1.1 • Published 5 years ago

collo-cli v1.1.1

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

collo Build Status All Contributors

Create palette of your resuable colors, test how they look in console and reuse them later.

Table of Contents

  1. collo
    1. Table of Contents
    2. Install
    3. Usage
    4. API
      1. collo.path
      2. collo.colors
      3. collo.edit(name, value)
      4. collo.add(name, value)
      5. collo.delete(name)
    5. Contribution
      1. Development
      2. TODO
    6. Contributors
    7. License

Install

Install collo as a global dependency to use it from every directory in your console.

yarn global add collo-cli

Usage

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.

API

Nevertheless, collo is not only a CLI tool—it gots a few built-in methods to allow you work with it in your projects.

collo.path

Path to your color palette. collo uses conf under the hood to store data; collo.path is just a shortcut for collo.config.path.

collo.colors

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'
}

collo.edit(name, value)

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')

collo.add(name, value)

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')

collo.delete(name)

Delete color from palette. Accepts only string matching one of the names in existing palette.

collo.delete('pink')

Contribution

If you have any ideas and will to work with me in this project—you are kindly welcome!

Development

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

TODO

  • TypeScript definitions
  • Jest tests
  • binaries

Contributors

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!

License

MIT © robertgrzonka

1.1.1

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago