Skip to content

Modern Tui TuiColor Index

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

Home › Terminal TUI Library › Colour and Style › TuiColor.Index

TuiColor.Index

Returns the palette number of a 16-colour or 256-colour value.

Syntax

TuiColor.Index( ) as uint8

Description

The palette index, for an ANSI-16 or 256-colour value. Meaningless for RGB and default colours.

Example

#import "std/tui"
using tui

print TuiIndexed( 214 ).Index( )             '' 214
print TuiAnsi( TUIC_BRIGHTBLUE ).Index( )    '' 12

See also

TuiColor TuiColor.Equals TuiAnsi TuiRgb TuiRed TuiYellow
TuiColor.IsDefault TuiDefaultColor 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