0

I found this code which changes the colour of the text in Batch:

powershell write-host -fore Red -back Yellow "Hello World!"

But can I have different colours on the same line?

GoldenD60
  • 15
  • 6

1 Answers1

3

try this:

write-host -fore Red -back Yellow "Hello World!" -NoNewline
write-host -fore Cyan -back Green " Merry Christmas!"
Esperento57
  • 16,521
  • 3
  • 39
  • 45