This commit is contained in:
2026-02-08 14:49:30 +08:00
parent 8c3014394f
commit 3cfce3ef87
2 changed files with 17 additions and 9 deletions

View File

@@ -3,7 +3,7 @@
import {term} from "https://script.hatter.ink/@32/deno-commons-mod.ts";
function printColors(colors: string[], prefix: string, suffix: string) {
const termOutputs = [];
const termOutputs: string[] = [];
for (const color of colors) {
termOutputs.push(
term.auto(
@@ -15,7 +15,7 @@ function printColors(colors: string[], prefix: string, suffix: string) {
}
async function main() {
const colors = [
const colors: string[] = [
"black",
"red",
"green",
@@ -33,10 +33,18 @@ async function main() {
console.log();
printColors(colors, "bg_", "_bright");
console.log();
console.log(term.auto('[bg_black][white][bold]Bold, white and black background [/][/][/]'));
console.log(term.auto('[black][bg_white][bold]Bold, black and white background [/][/][/]'));
console.log(
term.auto(
"[bg_black][white][bold]Bold, white and black background [/][/][/]",
),
);
console.log(
term.auto(
"[black][bg_white][bold]Bold, black and white background [/][/][/]",
),
);
}
await main();
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20260208T144636+08:00.MEUCIQCyWJ2Yiijq3QYzuGXC
// uF1MfCW1yjFC5LmxDXQwGs8efgIgD6Xfh/4jUoDMjhRhp2itj9juT4PkGkP2u+9AhBZo1hY=
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20260208T144919+08:00.MEYCIQCSlSgTG6QYjn33Q5EH
// mGh2Fgzhn6QZVFCSKSJYcJrvxwIhAJeu9a64omxuy3aSMLggr7aWnTpDNNWq1dIM8qvjFNQ9