From 1c6f0f7a1b0cf5cfd3d3f57515b0ea81a5ad0d0f Mon Sep 17 00:00:00 2001 From: FliPPeDround <734243792@qq.com> Date: Wed, 19 Jul 2023 10:24:16 +0800 Subject: [PATCH] feat: getColorDepth >= 8 --- README.md | 4 ++++ src/utils/banners.ts | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f6118ea..2a5128d 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,10 @@

+

+>_ Easy to use create uni▌ +

+ # 📦 使用 ```shell diff --git a/src/utils/banners.ts b/src/utils/banners.ts index 63be096..ad2e610 100644 --- a/src/utils/banners.ts +++ b/src/utils/banners.ts @@ -1,4 +1,4 @@ -import { green } from 'kolorist' +import { lightCyan } from 'kolorist' /* eslint-disable no-console */ export function printBanner() { @@ -16,9 +16,9 @@ export function printBanner() { colorText += `\x1B[38;2;${red};${green};${blue}m${text[i]}\x1B[0m` } - const output = process.stdout.isTTY && process.stdout.getColorDepth() > 8 + const output = process.stdout.isTTY && process.stdout.getColorDepth() >= 8 ? colorText - : green(text) + : lightCyan(text) console.log() console.log(output)