2017 © Pedro Peláez

library laravel-artisan-colour



  • Tuesday, June 24, 2014
  • by jralph
  • Repository
  • 1 Watchers
  • 3 Stars
  • 43 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown


Laravel Artisan Colours

A simple extension of the laravel Illuminate\Console\Command object to add some colour functionality., (*1)

Laravel's artisan already has some colour features using the info, error, comment and line methods, but it does not give you all of them. This package lets you use all of the available ANSI colours with the line method., (*2)


Installation is nice and simple using composer., (*3)

Add the package to your composer.json file., (*4)

"require": {
    "jralph/laravel-artisan-colour": "1.*"

Once done, run a composer update and follow the setup below., (*5)


Setup is nice and simple and only requires two steps., (*6)

  1. Add 'Jralph\LaravelArtisanColour\LaravelArtisanColourServiceProvider', to your app/config/app.php providers array.
  2. Make sure that any classes you want to use the colours extend Jralph\LaravelArtisanColour\Console\Command.


Using the colours is easy and straight forward., (*7)

Colours are only available on the $this->line(); method as the others already have colours associated with them., (*8)

Syntax:, (*9)

- __With Background__: `$this->line('This is some text.', 'text_colour:background_colour');`
- __Only Test__: `$this->line('This is some text.', 'text_colour');`

Available Colours

Below is a list of all available text colour and background colours., (*10)

  • Black
  • White
  • Red
  • Green
  • Blue
  • Yellow
  • Cyan
  • Magenta

Using a combination of the above colours with the package will give you the desired text/background colours., (*11)

Optional Config

The package also includes optional configuration that you may change if desired., (*12)

Publish the config: php artisan config:publish jralph/LaravelArtisanColour, (*13)


This file contains a single option. Should the colours be output when using windows., (*14)

If this option is true, the package will output the ansi colour codes. If you do not have your command line setup to read these codes and set the colours, then you may want to set this option to false., (*15)


This file contains settings for all of the colours., (*16)

In this file you can set the default text colour (white) and default background colour (black)., (*17)

The Versions

24/06 2014



  Sources   Download


The Requires


by Joseph Ralph

24/06 2014


  Sources   Download

The Requires


by Joseph Ralph