How to change white font colors to green?

General information and assistance with DOSBox.

How to change white font colors to green?

Postby max123xd » 2016-10-21 @ 17:22

Hi, i'm using dosbox 0.74 and it's a really fun emulator. but the white color doesn't fit with it. so i'm asking, how do you change the wite text color to green? i appreciate it if someone knows the answer, because i looked everywhere on internet, and i didn't find anything to change the font from white to green. and thx for reading this.
max123xd
Newbie
 
Posts: 2
Joined: 2016-10-21 @ 17:11

Re: How to change white font colors to green?

Postby Jorpho » 2016-10-21 @ 17:53

User avatar
Jorpho
l33t++
 
Posts: 7043
Joined: 2003-2-14 @ 19:50
Location: Canada

Re: How to change white font colors to green?

Postby max123xd » 2016-10-21 @ 20:21

thx for the answer, but no. i looked that way too. but i didn't find anything on the whole web. thx for trying to help me.
max123xd
Newbie
 
Posts: 2
Joined: 2016-10-21 @ 17:11

Re: How to change white font colors to green?

Postby Jorpho » 2016-10-21 @ 21:05

I don't think you're looking closely enough.
viewtopic.php?t=33304

You will also probably need the EGA color table.
https://en.wikipedia.org/wiki/File:EGA_Table.PNG
User avatar
Jorpho
l33t++
 
Posts: 7043
Joined: 2003-2-14 @ 19:50
Location: Canada

Re: How to change white font colors to green?

Postby zirkoni » 2016-10-22 @ 10:24

Add this at the beginning of DOSBox autoexec:
Code: Select all
@echo esc[32m


or light green:
Code: Select all
@echo esc[1;32m


Replace "esc" with the escape character.
User avatar
zirkoni
Member
 
Posts: 161
Joined: 2014-7-17 @ 08:54

Re: How to change white font colors to green?

Postby Hobbyist » 2018-5-09 @ 14:23

Somewhere I found that the escape character in DOS would be "$e", so I inserted

Code: Select all
@echo $e[32m


in the autoexec section of the DOSBox cofiguration file, but that doesn't work (no color change).

I found examples for DOS which use "prompt" instead of "@echo", but it seems the prompt command is not available in DOSBox.

Any other ideas?
Hobbyist
Newbie
 
Posts: 2
Joined: 2018-5-09 @ 13:54

Re: How to change white font colors to green?

Postby zirkoni » 2018-5-09 @ 15:34

The esc-character is a special character that you can't type "normally". You can type it in some text editors by holding the Alt-key and typing the character code number with the keypad keys. (I don't remember what the number is).

Copy & pasting doesn't necessarily work either (different encoding etc.) and it seems it can't be pasted here on this forum at all.

EDIT: The code for esc is 027. Works for example in Notepad++ (you get a black square that has the letters "esc" inside it).
Hold down Alt, type 027 on the numpad, release Alt.
Last edited by zirkoni on 2018-5-09 @ 15:37, edited 1 time in total.
User avatar
zirkoni
Member
 
Posts: 161
Joined: 2014-7-17 @ 08:54

Re: How to change white font colors to green?

Postby ripsaw8080 » 2018-5-09 @ 15:35

Press and hold ALT key, type 27 on keypad, release ALT key. :)
User avatar
ripsaw8080
DOSBox Author
 
Posts: 4198
Joined: 2006-4-25 @ 23:24

Re: How to change white font colors to green?

Postby Hobbyist » 2018-5-09 @ 21:08

Thanks zirkoni and ripsaw8080, this worked!
Hobbyist
Newbie
 
Posts: 2
Joined: 2018-5-09 @ 13:54

Re: How to change white font colors to green?

Postby Azarien » 2018-5-10 @ 21:05

Hobbyist wrote:Somewhere I found that the escape character in DOS would be "$e"

I found examples for DOS which use "prompt" instead of "@echo"


$e is interpreted as escape code by prompt (in MS-DOS), but not by echo.
prompt has also the advantage of automatically resetting the colors each time you exit a program (which might've mangled your customized colors).
Azarien
Oldbie
 
Posts: 521
Joined: 2015-5-14 @ 07:14


Return to DOSBox General

Who is online

Users browsing this forum: No registered users and 2 guests