Terminal orange text

Why do you never see orange text text?

For example, in python:

class text_color:
        black = '\033[30m'
        red = '\033[31m'
        green = '\033[32m'
        yellow = '\033[33m'
        blue = '\033[34m'
        magenta = '\033[35m'
        cyan = '\033[36m'
        white = '\033[37m'

# START MAIN
print text_color.yellow + "YAY"

      

Why doesn't it work? Why have you never seen the orange version?

orange = '\033[40m'

      

* DECISION *

I didn't understand terminals at the beginning of this problem. If you are in my shoes, please refer to this site to answer your question:

http://misc.flogisoft.com/bash/tip_colors_and_formatting

+3


source to share


2 answers


Because you can't just create the code and give it a color name because you want it to exist?

Your terminal only has available colors. (Many go to 88 or 256 at this point, but these are extended codes.)



Also, you don't technically know what 36

(for example) really blue. You just know that you are asking for a color in that slot (the terminal can have any color in that slot it wants).

+3


source


The exit codes come from the days when the computer couldn't display more than 8 different colors at the same time - they had to choose that those 8 colors (8 foregrounds, 8 backgrounds for a total of "16 colors") were and orange was not an option. when they chose them.



EDIT: Please note that these are colors defined in the ANSI standard - there are terminals that have non-ANSI colors, although ANSI is the most common (and ubiquitous these days). Users can also manipulate their terminals to display other color schemes.

+1


source







All Articles