ANSI Command Line Colors under Windows
November 28, 2011

Steps

Having colored text in the command line is a great help for spotting error or success messages. Unfortunately, those of us developing under Windows do not have this feature by default. Here’s how to enable it.

  1. Download ANSICON from: https://github.com/adoxa/ansicon
  2. Extract the proper files (Depending on if you have a 32 or 64 bit machine) to c:\ansicon\ (For example). I have a 32 bit machine and hence I extracted the files from inside the x86 folder.
  3. Open an elevated privilege command line prompt and go to c:\ansicon, and then type “ansicon -i” without the quotes
  4. Add c:\ansicon to your path environment variable

Done. You can now enjoy the colored output of PHPUnit for example.

Extra Notes and Updates

Note: I have installed ANSICON 1.3 under Windows 7 x86 (32 bits). My best guess is that this process will work for other versions of Windows too.

Update: I have installed ANSICON 1.61 under Windows 8 x64 (64 bits) and it works perfectly. The above steps are also updated to work under Windows 8.

Update: I have written a new post on how to Generate Command Line Colors with PHP


Development CLI Windows

Share this post


Written by
Mario Awad

Founder of SOFTKUBE, lead developer, and getting things done addict. Passionate about open source, user interface design, business development, and the tech world.

More about Mario Awad


About
SOFTKUBE

A small team of experts developing simple, usable, and high-quality web solutions. We blog about business, entrepreneurship, web development, and technology.

More about us


Recent Posts

Custom Theme Migration from Drupal 9 to Drupal 10

How to Change the Most Recent Git Commit Message

How to Make Google Chrome Forget a Permanent HTTP 301 Redirect

Finding and Fixing Unintended Body Overflow to Remove Horizontal Scrollbars

View all posts


All Posts Categories

Business Cheat Sheets CLI Design Development Downloads Drupal Email Google Apps HID Keyboards Multilingualism Open Source Philosophy PHP Pointing Devices Productivity Quotes Science Security SEO Technology Thoughts Windows Zend Framework