473,396 Members | 2,013 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Color in Windows CLI?

Does anyone know how to make PHP display colors in the CLI (Command
Line Interface)? I've tried almost everything including ANSI.SYS under
command.exe. I would like to find a way to do it under cmd.exe, I know
it will do colors under Linux in CLI using codes like "←[0;34mtest
←←[0m←" for Blue, but I need something to work under Windows.

Thanks!

Spudster

Dec 2 '05 #1
1 1972

Sp*******@gmail.com wrote:
Does anyone know how to make PHP display colors in the CLI (Command
Line Interface)? I've tried almost everything including ANSI.SYS under
command.exe. I would like to find a way to do it under cmd.exe, I know
it will do colors under Linux in CLI using codes like "←[0;34mtest
←←[0m←" for Blue, but I need something to work under Windows.

Thanks!

Spudster


If you can somehow get the Win32 module to work, the functions your
need are GetStdHandle() and SetConsoleTextAttribute(). Both are in
kernel32.dll I believe.

Dec 2 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Ken Lindner | last post by:
I have a need to become familiar with SQL Server 2000 for work. Needless to say I am new to SQL Server any version, but not IT in general. My employer has provided me with the SQL Server 2000...
5
by: Park | last post by:
In the multiple line textbox, is it possible that every sentences shows different color ? For example, test sentence 1 : red test sentence 2 : blue ....
6
by: WhoopDing | last post by:
How do I display a Color Dialog in the client browser? I want the Color Dialog to be displayed when the user clicks a button.
36
by: AussieRules | last post by:
Hi, I want to use the user color scheme to set the color of my forms. I now I have to use the. System.Drawing.SystemColors, but which color is the color of a form background as used in other...
1
by: Scott Davies | last post by:
Hi, I'm looking for some help on a small program that I'm trying to develop in VB.NET. I'm having trouble getting the code that I've written to work, can anyone shed some light as to where I'm...
0
by: Scott Davies | last post by:
Hi, I'm looking for some help on a small program that I'm trying to develop in VB.NET. The program I'm trying to develop needs to be able to do the following: - Select remote server -...
31
by: jcrouse | last post by:
Is there a quick and easy way to change the color of a label controls border from the default black to white? Thank you, John
8
by: =?Utf-8?B?bGpsZXZlbmQy?= | last post by:
I want to determine the Windows color scheme that is being used by my app. This means that I need to determine the following: 1. Does the OS support themes? 2. Are themes currently enabled...
2
by: DNB | last post by:
I would like to add this color #E7EBF7 to my WPF data grid I know that I can add light blue color using following: Grid b = new Grid(); b.Background =...
6
by: James Hahn | last post by:
That looks like proper Property set code to me. What is the line of code that the designer is generating in the Sub InitializeComponent for a color that you select in the Properties Settings? ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.