Skip to content

Modern Tui TuiColor Equals

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

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

TuiColor.Equals

Returns true if two colours were built the same way with the same values.

Syntax

TuiColor.Equals( byval o as TuiColor ) as boolean

Description

Compares kind and components. Two colours that would render identically but were built differently are NOT equal -- TuiRgb( 0, 0, 0 ) is not TuiAnsi( TUIC_BLACK ).

Example

#import "std/tui"
using tui

print TuiRgb( 10, 20, 30 ).Equals( TuiRgb( 10, 20, 30 ) )    '' true
print TuiRgb( 0, 0, 0 ).Equals( TuiAnsi( TUIC_BLACK ) )      '' false

See also

TuiColor TuiColor.Index 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