1.1.0
π¨ Terminal color support detection for π¦ Deno
Repository
Current version released
5 years ago
Dependencies
std
ποΈ Crayon.js color support for π¦ Deno
π About
This package is extension for crayon.js however it can still be used by other packages.
Syntax
interface CrayonColorSupport {
threeBitColor: boolean
fourBitColor: boolean
highColor: boolean
trueColor: boolean
}Usage
import { getColorSupport, supportedColors, getWindowsVersion } from 'https://deno.land/x/crayon_color_support/mod.ts';
const support = getColorSupport(); // detect terminal color support
const cached = supportedColors(); // cached getColorSupport (it just returns cached object)
const windowsVersion = getWindowsVersion(); // Reusable function [version (7/8/10...), versionId (14931...)], empty if detected system is not WindowsUsage with crayon.js
import crayon from 'https://deno.land/x/crayon/mod.ts'; // it'll still work with modules that extend crayon instance as its config is global
import { getColorSupport } from 'https://deno.land/x/crayon_color_support/mod.ts';
crayon.config.colorSupport = getColorSupport();Wiki
To learn more about Crayon and its API look here