I am creating a JS RPG CLI game and I have a question about styled output. Once executed, the script outputs a framed Welcome. I need that frame to be colored and the text within needs to be white.
I need this: https://i.sstatic.net/XuYYK.png
I did it with the simple console.log():
console.log(`
+-----------------------------+
| Welcome ! |
+-----------------------------+
`)
To change color I am using simple color references of text:
console.log('\x1b[36m%s\x1b[0m', `
+-----------------------------+
| Welcome ! |
+-----------------------------+
`)`
My output is: https://i.sstatic.net/NHtaU.png This changes the color of everything, including the Welcome text and I need that white.
So, how to do that ?