Skip to content

Modern Tui TuiAnsi

Paul Squires edited this page Oct 19, 2026 · 6 revisions

Home › Terminal TUI Library › Colour and Style › TuiAnsi

TuiAnsi

Returns one of the 16 classic colours, which follow the user's terminal theme.

Syntax

TuiAnsi( byval idx as TuiAnsiIndex ) as TuiColor

Description

One of the sixteen classic colours. Use these when you want the user's palette honoured rather than a colour you chose -- a terminal theme remaps them and yours will fit in.

Example

#import "std/tui"
using tui

dim as TuiColor c = TuiAnsi( TUIC_BRIGHTGREEN )
print c.Index( )                  '' 10

'' the sixteen names: TUIC_BLACK RED GREEN YELLOW BLUE MAGENTA CYAN WHITE
'' and the TUIC_BRIGHT* forms of each

See also

TuiColor TuiColor.Equals TuiDefaultColor TuiRgb TuiRed TuiYellow
TuiColor.IsDefault TuiColor.Index TuiIndexed TuiBlack TuiGreen TuiBlue

Library: Terminal TUI Library
Category: Terminal TUI Library
Documented under: Colour and Style
Working examples: hello.tiko · form.tiko · dashboard.tiko


Home · Keyword Index

Clone this wiki locally