Coder Social home page Coder Social logo

terminal-color's Introduction

Introduction

  1. terminal-color is implemented by multiple programming languages, for printing colorful output in terminal.
  2. Every implement is simple enough with no third-party dependency. You don't need to think of it as a dependency library, so that you can copy the codes in your project.
  3. Every implement has similar method names, so you can use it smoothly in different programming languages.
  4. Color functions could be composed together, like putting red into bold: bold(red(string)).

color_function

color_function decorates string with specified color. color_function is one of below function names:

Colors Background Highlight
black black_bg black_hl
red red_bg red_hl
green green_bg green_hl
yellow yellow_bg yellow_hl
blue blue_bg blue_hl
magenta magenta_bg magenta_hl
cyan cyan_bg cyan_hl
white white_bg white_hl

A color function with _bg suffix means it will set the color as background. A color function with _hl suffix means it will set the color as background, and change the foreground as well to make the string more standout.

style_function

style_function decorates string with specified style. style_function is one of below function names:

  • bold
  • italic
  • underline
  • strike
  • blink

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.