Giter Site home page Giter Site logo

color-echo's Introduction

Color Echo

A simple node.js utility for printing colored output to the terminal

Originally made for practice with node.js

Currently supports CSS keywords and hex color codes

Usage

Usage:
  colorecho.js [OPTIONS] [ARGS]

Options: 
  -c, --color [STRING]   The keyword for the color to be applied to the provided 
                         text  (Default is orange)
  -h, --hex STRING       The hex code of the color to be applied to the provided 
                         text. Do not include #

Examples:

./colorecho.js testing -c red 

prints "testing" in the color red on a new line

./colorecho.js testing -h 32dbc6

prints "testing" in the color with hex code #322dbc (a cyan color). Note that the # symbol must be absent.

Future plans

  • Support rgb, hsl color modes
  • Support using a default color defined in a file
  • Support piping input from stdout

Made by Ralph Nahra

color-echo's People

Stargazers

Sam Wolstencroft avatar

Watchers

James Cloos avatar Ralph Nahra avatar

color-echo's Issues

Add HSL support

Add support for defining colors using the hue, saturation, lightness color model.

Reverts to default color when using # symbol with hex color code

If the # symbol is included with the hex color code when using color-cli.js with the --hex option, color-cli reverts to using the default hardcoded color. This seems to be a result of the cli.parse failing to identify a string if the # symbol is present at the beginning. A bug report with the upstream package may be necessary.

Example

./colorcli.js test -h df4d19

prints the text in the specified hex color code fine.

./colorcli.js test -h #df4d19

prints the text in the default color specified in --color's parameters.

Add RGB support

Add support for using RGB representations of colors to specify colors for the text. Parsing the numbers may be problematic as cli.parse has limited capability. Parsing the RGB numbers as strings or using a different option for each of the RGB triplets is possible but not ideal.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.