Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Declined "faint" vs "bright"?

Jul
272
6
Hi,

I know we can specify RGB values for the color command, but it would be cool if it had presets for "faint" the same way we do for "bright", since this is now supported in Windows with Windows Terminal....

Just a thought!
 
TCC's color names are for the sixteen colors in the default EGA palette. There's no real point in extending the scheme. The EGA palette, and Windows's traditional console support, remain stuck at 16 colors.

If you want names for a broader range of RGB colors, I recommend instead the W3C color names. (I support these in some of my plugins.)
 
Where, how is "faint" supported in WT?

via the ansi escape codes

1687194688403.png



generated via this section my own environment-variable-setting script set-colors.bat:

Code:
REM colors for ANSI
        rem refactor annoying left bracket
            set ESCAPE=%@CHAR[27]
            set ANSI_ESCAPE=%@CHAR[27][
            set ANSI_RESET=%ANSI_ESCAPE%0m
        rem Foreground Colors
            set ANSI_BLACK=%ANSI_ESCAPE%30m
            set ANSI_RED=%ANSI_ESCAPE%31m
            set ANSI_GREEN=%ANSI_ESCAPE%32m
            set ANSI_YELLOW=%ANSI_ESCAPE%33m
            set ANSI_BLUE=%ANSI_ESCAPE%34m
            set ANSI_MAGENTA=%ANSI_ESCAPE%35m
            set ANSI_CYAN=%ANSI_ESCAPE%36m
            set ANSI_WHITE=%ANSI_ESCAPE%37m
            set ANSI_GRAY=%ANSI_ESCAPE%90m
            set ANSI_GREY=%ANSI_ESCAPE%90m
            set ANSI_BRIGHT_RED=%ANSI_ESCAPE%91m
            set ANSI_BRIGHT_GREEN=%ANSI_ESCAPE%92m
            set ANSI_BRIGHT_YELLOW=%ANSI_ESCAPE%93m
            set ANSI_BRIGHT_BLUE=%ANSI_ESCAPE%94m
            set ANSI_BRIGHT_MAGENTA=%ANSI_ESCAPE%95m
            set ANSI_BRIGHT_CYAN=%ANSI_ESCAPE%96m
            set ANSI_BRIGHT_WHITE=%ANSI_ESCAPE%97m
        rem Background Colors
            set ANSI_BACKGROUND_BLACK=%ANSI_ESCAPE%40m
            set ANSI_BACKGROUND_RED=%ANSI_ESCAPE%41m
            set ANSI_BACKGROUND_GREEN=%ANSI_ESCAPE%42m
            set ANSI_BACKGROUND_YELLOW=%ANSI_ESCAPE%43m
            set ANSI_BACKGROUND_BLUE=%ANSI_ESCAPE%44m
            set ANSI_BACKGROUND_MAGENTA=%ANSI_ESCAPE%45m
            set ANSI_BACKGROUND_CYAN=%ANSI_ESCAPE%46m
            set ANSI_BACKGROUND_WHITE=%ANSI_ESCAPE%47m
            set ANSI_BACKGROUND_GREY=%ANSI_ESCAPE%100m
            set ANSI_BACKGROUND_GRAY=%ANSI_ESCAPE%100m
            set ANSI_BACKGROUND_BRIGHT_RED=%ANSI_ESCAPE%101m
            set ANSI_BACKGROUND_BRIGHT_GREEN=%ANSI_ESCAPE%102m
            set ANSI_BACKGROUND_BRIGHT_YELLOW=%ANSI_ESCAPE%103m
            set ANSI_BACKGROUND_BRIGHT_BLUE=%ANSI_ESCAPE%104m
            set ANSI_BACKGROUND_BRIGHT_MAGENTA=%ANSI_ESCAPE%105m
            set ANSI_BACKGROUND_BRIGHT_CYAN=%ANSI_ESCAPE%106m
            set ANSI_BACKGROUND_BRIGHT_WHITE=%ANSI_ESCAPE%107m


REM As of Windows Terminal we can now actually display italic characters
            REM 0m=reset, 1m=bold, 2m=faint, 3m=italic, 4m=underline, 5m=blink slow, 6m=blink fast, 7m=reverse, 8m=conceal, 9m=strikethrough
            set ANSI_BOLD=%ANSI_ESCAPE%1m
            set ANSI_BOLD_ON=%ANSI_BOLD%
            set ANSI_BOLD_OFF=%ANSI_ESCAPE%22m
            set BOLD_ON=%ANSI_BOLD_ON%
            set BOLD_OFF=%ANSI_BOLD_OFF%
            set BOLD=%BOLD_ON%

            set ANSI_FAINT=%ANSI_ESCAPE%2m
            set ANSI_FAINT_ON=%ANSI_FAINT%
            set ANSI_FAINT_OFF=%ANSI_ESCAPE%22m
            set FAINT_ON=%ANSI_FAINT_ON%
            set FAINT_OFF=%ANSI_FAINT_OFF%
            set FAINT=%FAINT_ON%

            set ANSI_ITALICS=%ANSI_ESCAPE%3m
            set ANSI_ITALICS_ON=%ANSI_ITALICS%
            set ANSI_ITALICS_OFF=%ANSI_ESCAPE%23m
            set ITALICS_ON=%ANSI_ITALICS_ON%
            set ITALICS_OFF=%ANSI_ITALICS_OFF%
            set ITALICS=%ITALICS_ON%

            set ANSI_UNDERLINE=%ANSI_ESCAPE%4m
            set ANSI_UNDERLINE_ON=%ANSI_UNDERLINE%
            set ANSI_UNDERLINE_OFF=%ANSI_ESCAPE%24m
            set UNDERLINE_ON=%ANSI_UNDERLINE_ON%
            set UNDERLINE_OFF=%ANSI_UNDERLINE_OFF%
            set UNDERLINE=%UNDERLINE_ON%

            set ANSI_OVERLINE=%ANSI_ESCAPE%53m
            set ANSI_OVERLINE_ON=%ANSI_OVERLINE%
            set ANSI_OVERLINE_OFF=%ANSI_ESCAPE%55m
            set OVERLINE_ON=%ANSI_OVERLINE_ON%
            set OVERLINE_OFF=%ANSI_OVERLINE_OFF%
            set OVERLINE=%OVERLINE_ON%

            set ANSI_DOUBLE_UNDERLINE=%ANSI_ESCAPE%21m
            set ANSI_DOUBLE_UNDERLINE_ON=%ANSI_DOUBLE_UNDERLINE%
            set ANSI_DOUBLE_UNDERLINE_OFF=%ANSI_ESCAPE%24m
            set DOUBLE_UNDERLINE_ON=%ANSI_DOUBLE_UNDERLINE_ON%
            set DOUBLE_UNDERLINE_OFF=%ANSI_DOUBLE_UNDERLINE_OFF%
            set DOUBLE_UNDERLINE=%DOUBLE_UNDERLINE_ON%

                set ANSI_UNDERLINE_DOUBLE=%ANSI_DOUBLE_UNDERLINE%
                set ANSI_UNDERLINE_DOUBLE_ON=%ANSI_DOUBLE_UNDERLINE_ON%
                set ANSI_UNDERLINE_DOUBLE_OFF=%ANSI_DOUBLE_UNDERLINE_OFF%
                set UNDERLINE_DOUBLE_ON=%DOUBLE_UNDERLINE_ON%
                set UNDERLINE_DOUBLE_OFF=%DOUBLE_UNDERLINE_OFF%
                set UNDERLINE_DOUBLE=%DOUBLE_UNDERLINE%


            set ANSI_BLINK_SLOW=%ANSI_ESCAPE%5m
            set ANSI_BLINK_SLOW_ON=%ANSI_BLINK_SLOW%
            set ANSI_BLINK_SLOW_OFF=%ANSI_ESCAPE%25m
            set BLINK_SLOW_ON=%ANSI_BLINK_SLOW_ON%
            set BLINK_SLOW_OFF=%ANSI_BLINK_SLOW_OFF%
            set BLINK_SLOW=%BLINK_SLOW_ON%

            set ANSI_BLINK_FAST=%ANSI_ESCAPE%6m
            set ANSI_BLINK_FAST_ON=%ANSI_BLINK_FAST%
            set ANSI_BLINK_FAST_OFF=%ANSI_ESCAPE%25m
            set BLINK_FAST_ON=%ANSI_BLINK_FAST_ON%
            set BLINK_FAST_OFF=%ANSI_BLINK_FAST_OFF%
            set BLINK_FAST=%BLINK_FAST_ON%

            set ANSI_BLINK=%ANSI_BLINK_FAST%
            set ANSI_BLINK_ON=%ANSI_BLINK_FAST_ON%
            set ANSI_BLINK_OFF=%ANSI_BLINK_FAST_OFF%
            set BLINK_ON=%ANSI_BLINK_ON%
            set BLINK_OFF=%ANSI_BLINK_OFF%
            set BLINK=%BLINK_ON%

            set ANSI_REVERSE=%ANSI_ESCAPE%7m
            set ANSI_REVERSE_ON=%ANSI_REVERSE%
            set ANSI_REVERSE_OFF=%ANSI_ESCAPE%27m
            set REVERSE_ON=%ANSI_REVERSE_ON%
            set REVERSE_OFF=%ANSI_REVERSE_OFF%
            set REVERSE=%REVERSE_ON%

            set ANSI_CONCEAL=%ANSI_ESCAPE%8m
            set ANSI_CONCEAL_ON=%ANSI_CONCEAL%
            set ANSI_CONCEAL_OFF=%ANSI_ESCAPE%28m
            set CONCEAL_ON=%ANSI_CONCEAL_ON%
            set CONCEAL_OFF=%ANSI_CONCEAL_OFF%
            set CONCEAL=%CONCEAL_ON%

            set ANSI_STRIKETHROUGH=%ANSI_ESCAPE%9m
            set ANSI_STRIKETHROUGH_ON=%ANSI_STRIKETHROUGH%
            set ANSI_STRIKETHROUGH_OFF=%ANSI_ESCAPE%29m
            set STRIKETHROUGH_ON=%ANSI_STRIKETHROUGH_ON%
            set STRIKETHROUGH_OFF=%ANSI_STRIKETHROUGH_OFF%
            set STRIKETHROUGH=%STRIKETHROUGH_ON%


REM wow it even supports the vt100 2-line-tall text!
            set BIG_TEXT_LINE_1=%ESCAPE%#3
            set BIG_TEXT_LINE_2=%ESCAPE%#4
            set BIG_TOP=%BIG_TEXT_LINE_1%
            set BIG_BOT=%BIG_TEXT_LINE_2%
            set BIG_BOTTOM=%BIG_BOT%
            REM this is a guess:
            set BIG_TEXT_END=%ESCAPE%#0


set ANSI_TEST_STRING=concealed:'%CONCEAL%conceal%CONCEAL_off%' %ANSI_RED%R%ANSI_ORANGE%O%ANSI_YELLOW%Y%ANSI_GREEN%G%ANSI_CYAN%C%ANSI_BLUE%B%ANSI_MAGENTA%V%ANSI_WHITE% Hello, world. %BOLD%Bold!%BOLD_OFF% %FAINT%Faint%FAINT_OFF% %ITALICS%Italics%ITALIC_OFF% %UNDERLINE%underline%UNDERLINE_OFF% %OVERLINE%overline%OVERLINE_OFF% %DOUBLE_UNDERLINE%double_underline%DOUBLE_UNDERLINE_OFF% %REVERSE%reverse%REVERSE_OFF% %BLINK_SLOW%blink_slow%BLINK_SLOW_OFF% [non-blinking] %BLINK_FAST%blink_fast%BLINK_FAST_OFF% [non-blinking] %blink%blink_default%blink_off% [non-blinking] %STRIKETHROUGH%strikethrough%STRIKETHROUGH_OFF%
set ANSI_TEST_STRING_2=%BIG_TEXT_LINE_1%big% %ANSI_RESET% Normal One
set ANSI_TEST_STRING_3=%BIG_TEXT_LINE_2%big% %ANSI_RESET% Normal Two

if "%1" eq "test" (
    echo %ANSI_TEST_STRING%
    echo %ANSI_TEST_STRING_2%
    echo %ANSI_TEST_STRING_3%
)
`
 
Last edited:
I'm super happy to discover today that it supports the DEC double-height lines, as I want to use those to make my errors more obvious.

I already have my echo-big.bat that builds off the set-colors.bat that defines all the ansi escape codes :)

1687195032486.png


Code:
@echo off

:USAGE: optionally set COLOR_TO_USE=<command to set the color to use> prior to calling for cosmetically better background color handling to avoid the cosmetic weirdness of newlines with a different background color

call validate-environment-variables BIG_TEXT_LINE_1 BIG_TEXT_LINE_2

set PARAMS=%@UNQUOTE[%*]

%COLOR_TO_USE% %+ echos %BIG_TEXT_LINE_1%%PARAMS% %+ %COLOR_NORMAL% %BIG_TEXT_END% %+ echo.
%COLOR_TO_USE% %+ echos %BIG_TEXT_LINE_2%%PARAMS% %+ %COLOR_NORMAL% %BIG_TEXT_END% %+ echo.

echos %BIG_TEXT_END%%ANSI_RESET%

REM option should only affect it once
if defined COLOR_TO_USE (set COLOR_TO_USE=)
 
Last edited:
Is ESC[2m documented anywhere?

You can use ^e where you use @char[27].

1687196503408.png
 
Is ESC[2m documented anywhere?

It is! Sadly I didn't annotate my discoveries.
There's a bazillion pages like this:

out there that list various codes. It was a bit frustrating finding an exhaustive list of the "DEC ANSI codes" (as i call them) in order to try to see if any of the other niche ones (like circled text) worked. Only the double-height did. I was happy because when I first got online in March 1988 it was on my dad's Dec VT100 terminal. No harddrive, no operating system, just a keyboard screen and modem. And the double-height text was like the coolest thing I'd ever seen at the time. I'm happy to finally bring it back today :)

You can use ^e where you use @char[27].

View attachment 4043

I can't because I set ^ to my command separator character hehe
 
It belongs here (the only place I go).
i think it actually is on that page:

1687197847321.png


They just haven't broken it down for all values of n

There oughtta be some law like Godwin's Law except that it states no documentation is ever 100% haha
 
Hmm, they do accept isuses (i've got a couple open) on their github! I'm not quite sure how to phrase it though.

this double-height text is so awesome.... i have a script that lists every drive letter and what drive it is, then color-codes it by which computer it belongs to (based on label, as i label my drives by a convention)

but generally speaking what i'm looking for when i run this is a usb/external drive inserted and looking to see what letter it chose, haha

so obvoiusly the ones that aren't recognized in my naming system should be double-height to draw my attention

easy enough fix, i love it

1687199221530.png
 
Back
Top