Ask coding questions

← Back to all posts
how do we change the color of the text that input
mathimo

abc

Voters
RicardoMartin27
BikramjeetDhugg
lazybluebird
neginlol
HarunBijedic
Felixclsn
QuartzRidg
lucasnili
NicoCurry
codesofnirmayof
Comments
hotnewtop
NikiArezehgar

ummm but how can you do the same thing but in javascript?

ash15khng

You can use ANSI escape sequences. More info here.
You could also use termcolor for Python (and I think a few other languages)

Geocube101

What Language?

mathimo

@Geocube101 python3

Geocube101

@mathimo you can use termcolor as specified by
ash15khng.

mathimo

@Geocube101 yes but can you show me an example

Geocube101

@mathimo

Valid termcolor colors can be found here