Arsenic-ATG / Awesome-Automations

A repository Full of 😎interesting Automations
MIT License
54 stars 18 forks source link

make console.log colorful #59

Open vivek80801 opened 2 years ago

vivek80801 commented 2 years ago

add colors to console.log in javascript projects.

For nodejs:

// This should be red color
console.log("\x1b[31m; %s \x1b[0m", "Hello world");
// for some more colors
for(let i =1; i <10; i++){
   for(let j = 30; j<38; j++){
     for(let k = 40; k<48; k++){
         console.log(`\x1b[${i};${k};${j}m Hello world \x1b[0m`);
        }
       }
    }
github-actions[bot] commented 2 years ago

It's great having you contribute to this project

Welcome to our project :nerd_face:

Our developers will respond you as soon as possible 🤓 . Any questions let us know.