Function setColorEnabled

  • Enable or disable text color when styling.

    @std/fmt/colors automatically detects NO_COLOR environmental variable and disables text color. Use this API only when the automatic detection doesn't work.

    Parameters

    • value: boolean

      The boolean value to enable or disable text color

    Returns void

    import { setColorEnabled } from "@std/fmt/colors";

    // Disable text color
    setColorEnabled(false);

    // Enable text color
    setColorEnabled(true);