![]() ![]() So you will have to add it in the uses clause:Ī simple program example can be given below: ![]() Like this:īut this procedure is in the crt unit. You can use something like TextColor(Red) before a Write or WriteLn function to print text with the Red color. How to change Text Color in Free PascalWe have a procedure for changing text color in Free Pascal, which is TextColor. We have 2 procedures to change text and background colors of Free Pascal console programs, TextColor and TextBackground. We will only focus on changing Text Color and yes, background color as well. How.?With the crt unit you can do many cool tricks to your dull boring good old console programs. But what if you need to change it? What if you want to highlight the results of your program with a different color to separate it from other text? We have an option. It is the usual color for any program written in Free Pascal as well. ![]() But who says you cannot change it! Here is a tip to change the text color of console programs.Ĭonsole programs written by any language uses the default color to show text. They have that whitish dull color in a black background. Console applications are not of entertaining type. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |