Skip to content
Documentation
Console Colors

Console Colors in verse.db

When it comes to enhancing the readability and visual clarity within the command-line interface, verse.db provides a seamless experience through its carefully crafted console colors. These colors not only make your interactions with the database more pleasant but also facilitate efficient data interpretation and navigation. πŸŒˆπŸš€

Here's a glimpse of the colors that VERSE.DB offers:

const colors = {
  reset: "\x1b[0m",
  bright: "\x1b[1m",
  dim: "\x1b[2m",
  underscore: "\x1b[4m",
  blink: "\x1b[5m",
  reverse: "\x1b[7m",
  hidden: "\x1b[8m",
  fg: {
    black: "\x1b[30m",
    red: "\x1b[31m",
    green: "\x1b[32m",
    yellow: "\x1b[33m",
    blue: "\x1b[34m",
    magenta: "\x1b[35m",
    cyan: "\x1b[36m",
    white: "\x1b[37m",
    gray: "\x1b[90m",
    offWhite: "\x1b[37;2;28;28;28m"
  },
  bg: {
    black: "\x1b[40m",
    red: "\x1b[41m",
    green: "\x1b[42m",
    yellow: "\x1b[43m",
    blue: "\x1b[44m",
    magenta: "\x1b[45m",
    cyan: "\x1b[46m",
    white: "\x1b[47m",
  },
};
 
export default colors;

How to Use?

To apply these console colors, simply use versedb.colors in your code. For example:

const versedb = require("versedb");
const consoleColors = versedb.colors;
 
console.log(consoleColors.fg.red, "This is Red", consoleColors.reset);
// This will log in the console: "This is Red" (in red color)
// The (consoleColors.reset) resets the color to normal afterward.

Feel free to explore the full spectrum of colors provided by verse.db and make your command-line interactions more vibrant! 🎨✨


VERSE.DB. Powered by JEDI Studio.