@nevware21/chromacon
    Preparing search index...

    Function getColorLevel

    • Returns the current maximum color level supported by the terminal.

      Returns ColorLevel

      The current color level supported by the terminal

      import { getColorLevel, ColorLevel } from "@nevware21/chromacon";

      // Get the current color level
      let level = getColorLevel();

      if (level === ColorLevel.TrueColor) {
      console.log("True color is supported");
      }

      if (level === ColorLevel.Rgb256) {
      console.log("256 colors are supported");
      }

      if (level === ColorLevel.Basic) {
      console.log("Basic 16 colors are supported");
      }