Download the PHP package testomat/terminal-colour without Composer

On this page you can find all versions of the php package testomat/terminal-colour. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package terminal-colour

Terminal color

Installation

Run

Note : By default, the Windows command console doesn’t support output coloring. This library disables output coloring for Windows systems. But if your commands or scripts invoke other scripts which emit color sequences, they will be wrongly displayed as raw escape characters. Install the Cmder, ConEmu, ANSICON or Mintty (used by default in GitBash and Cygwin) to add coloring support to your Windows command console.

Usage

Using Color Styles

The closing tag can be replaced by </>, which revokes all formatting options established by the last opened tag.

It’s possible to define your own styles using the Formatter class:

Available foreground and background colors are black, red, green, yellow, blue, magenta, cyan, white, default, dark_grey, light_grey, light_red, light_green, light_yellow, light_blue, light_magenta, light_cyan, light_white.

And available options are: none, bold, dark, italic, underscore, blink, blink_fast, crossed_out, double_underline, curly_underline, overlinem, reverse (enables the "reverse video" mode where the background and foreground colors are swapped) and conceal (sets the foreground color to transparent, making the typed text invisible—although it can be selected and copied; this option is commonly used when asking the user to type sensitive information).

You want to use 256 colors or true colors than you must use the StyleCode class.

You can also set these colors and options directly inside the tag name:

Note: if you need to render a tag literally, escape it with a backslash: \ or use the escape() method to escape all the tags included in the given string.

You have the possibility with formatAndWrap(string $message, int $width) function to wrap you text to a specific width, 0 means no wrapping.

Note: you want to check the color support for you terminal check the example folder out.

Displaying Clickable Links

Commands can use the special <href> tag to display links like the <a> elements of web pages:

If your terminal belongs to the list of terminal emulators that support links you can click on the "Narrowspark Homepage" text to open its URL in your default browser. Otherwise, you’ll see "Narrowspark Homepage" as regular text and the URL will be lost.

Terminal Util

You want to know, what color or how any columns your terminal supports, than you can call:

Links

Colors 3/4 bit

XVilka/TrueColour.md

Hyperlinks (a.k.a. HTML-like anchors) in terminal emulators

Versioning

This library follows semantic versioning, and additions to the code ruleset are performed in major releases.

Changelog

Please have a look at CHANGELOG.md.

Contributing

Please have a look at CONTRIBUTING.md.

Code of Conduct

Please have a look at CODE_OF_CONDUCT.md.

License

This package is licensed using the MIT License.

Please have a look at LICENSE.md.


All versions of terminal-colour with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3
thecodingmachine/safe Version ^1.1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package testomat/terminal-colour contains the following files

Loading the files please wait ....