Skip to content

v1.6.0

Latest

Choose a tag to compare

@crramirez crramirez released this 14 Jul 20:26
· 102 commits to main since this release

Casciian 1.6.0

Casciian 1.6.0 significantly expands terminal color support, introduces lightweight ANSI text widgets, separates the embedded terminal emulator into an optional component, and adds more flexible styling for modern-looking terminal applications.

256-color palette support

Casciian now supports the standard xterm 256-color palette as a first-class color mode alongside named ANSI colors and 24-bit RGB.

Applications can assign indexed foreground and background colors directly:

CellAttributes attr = new CellAttributes();

attr.setForeColorPalette(196);
attr.setBackColorPalette(Palette256.fromRgb(0x1e1e1e));

The ECMA-48 backend emits the corresponding indexed color sequences:

ESC[38;5;n
ESC[48;5;n

The new Palette256 utility provides:

  • conversion from named ANSI colors to palette indexes;
  • nearest-palette matching for arbitrary RGB values;
  • conversion from palette indexes back to RGB;
  • exact RGB-to-palette lookup.

Palette colors, RGB colors, and named colors are mutually exclusive for each foreground or background channel.

256-color support in the Colors Editor

The color theme editor now understands palette-based colors.

When an existing theme attribute uses a palette index, the editor displays its corresponding RGB value. When an entered RGB value exactly matches one of the 256 palette entries, Casciian can store it internally as a palette color.

Theme files remain portable and readable: palette colors are converted to RGB when a theme is saved instead of being persisted as Casciian-specific palette tokens.

More flexible theme color parsing

Theme color definitions are now parsed independently for the foreground and background channels.

This allows named, bright, and RGB colors to be mixed in the same definition:

#ffcc00 on blue
white on #1e1e1e
bright cyan on #202020

The legacy line-wide rgb: marker remains accepted for backward compatibility.

Bold now means bold

Casciian now separates the concepts of bold text and bright ANSI colors.

Previously, bold could be used to select the bright version of an ANSI color. In 1.6.0, bold is emitted as an actual SGR bold attribute, while brightness is represented explicitly through bright colors.

This improves standards compliance and allows themes—especially light themes—to use bold typography without unexpectedly changing the foreground color.

Applications that depend on the previous behavior can restore it with:

-Dcasciian.treatBoldAsBright=true

New ANSI text widgets

Casciian 1.6.0 introduces:

  • TTextAnsi
  • TTextAnsiWindow

These components display ANSI-formatted text without requiring a complete terminal emulator.

TTextAnsi uses a lightweight ANSI parser with support for:

  • named ANSI colors;
  • bright colors;
  • 256-color indexed sequences;
  • 24-bit RGB;
  • bold;
  • underline;
  • blink;
  • reverse video;
  • carriage return, line feed, tabs, and backspace;
  • wide characters;
  • terminal-style delayed line wrapping.

The widget reparses and reflows its content when resized, making it suitable for ANSI reports, logs, command output, help screens, and static ANSI artwork.

The demo’s ANSI file viewer now uses TTextAnsiWindow instead of running the content through the full ECMA-48 terminal emulator.

Correct terminal default-color handling

ANSI and ECMA-48 rendering now preserve the distinction between:

  • explicit black or white;
  • the terminal’s configured default foreground or background.

SGR reset operations such as 0, 39, and 49 now restore default-color state correctly instead of forcing explicit white-on-black rendering.

Plain text and reset ANSI content can therefore follow the active Casciian theme and the terminal’s configured defaults.

Shared SGR processing

ANSI widgets and the ECMA-48 terminal emulator now share the new SgrUtil implementation.

This consolidates:

  • ANSI attribute processing;
  • standard and bright color handling;
  • indexed and RGB extended-color parsing;
  • default-color resets;
  • the standard xterm 256-color palette.

This removes duplicated color-processing logic and keeps ANSI rendering behavior consistent across Casciian components.

New terminal component add-on

The embedded ECMA-48 terminal emulator and terminal-specific widgets have moved from Casciian core into a new independently publishable module:

casciian-terminal-component

The add-on contains:

  • the ECMA-48 terminal emulator;
  • terminal display and state classes;
  • TTerminal;
  • TTerminalWindow;
  • the deprecated TTextPicture compatibility widgets;
  • a standalone terminal-component demo.

This keeps the core library smaller for applications that do not embed a terminal emulator.

Migration

Terminal widgets now use the casciian.terminal.widget package:

// Before
import casciian.TTerminalWindow;

// Casciian 1.6.0
import casciian.terminal.widget.TTerminalWindow;

TApplication.openTerminal(...) has been removed. Applications should construct a TTerminalWindow directly after adding the terminal component dependency.

The Sixel decoder remains in core because it is also used by Casciian’s general image pipeline.

New button styles

TButton now supports two additional flat styles:

  • brackets, rendered as [ Button ];
  • diamonds, rendered as < Button >.

These styles reuse the existing button width and do not add shadows or move when pressed.

They can be configured globally:

-Dcasciian.TButton.style=brackets

or selected through the Desktop Style editor.

The Midnight Commander and Flat Dark themes use the bracket style in the demo application to provide a flatter, more terminal-native appearance.

Improved modern theme integration

The new styling capabilities continue the work started by the modern built-in themes.

Flat Dark remains the primary candidate for contemporary TUIs inspired by applications such as k9s, Claude CLI, and GitHub Copilot CLI, while developers can still configure Casciian for a classic ncurses-style interface.

Version 1.6.0 adds several theme-related improvements:

  • flat button styles;
  • real bold rendering;
  • 256-color palette support;
  • configurable progress bar borders;
  • theme-aware gradient backgrounds;
  • corrected moving-window border colors in the VS Code themes;
  • improved color editor behavior.

These changes provide more of the internal customization required for richer modern and light themes. Theme customization remains an ongoing area of development.

Configurable progress bar borders

TProgressBar now has independent border color keys:

tprogressbar.border
tprogressbar.border.modal

Progress bar brackets no longer need to share the incomplete-fill color. Themes can style progress bar borders independently in normal and modal windows.

All built-in themes include corresponding border definitions.

Theme-aware demo gradients

Gradient backgrounds in the demo application now derive their colors from the active theme instead of using a fixed pink, blue, and yellow palette.

Switching themes updates open gradient-enabled windows to use colors based on the selected theme, including separate modal variants.

Themes that intentionally disable gradients, such as Flat Dark, remain unaffected.

Demo behavior and menu sizing

The demo application now starts with standard Casciian behavior by default. Custom themes and effects can be enabled from the demo menus rather than being applied automatically.

The former --defaults argument has been removed.

Menu widths are now recalculated when menu icons are toggled at runtime, preventing clipped labels and ensuring menus shrink back to their original width when icons are disabled.

Submenus also calculate their width from their own labels rather than inheriting the width of a larger child menu.

Colors Editor fixes

The Colors Editor no longer carries stale RGB values from one color key to another.

Switching from an RGB-backed color to a named or palette-backed color now clears and refreshes the appropriate fields correctly.

VS Code theme fixes

The moving-window border colors in VS Code Dark Modern and VS Code Light Modern now use the themes’ normal foreground or chrome colors rather than their button-hover accent colors.

This keeps window borders consistent with the rest of each theme.

Micronaut companion integration

The README now references the independent casciian-micronaut companion project.

casciian-micronaut provides Micronaut integration for exposing Casciian-based TUIs from Micronaut applications while keeping the Casciian core framework-neutral.

This follows the same companion-project model as casciian-spring.

Configuration documentation

The README now clarifies that CASCIIANRC is an environment variable whose value points to a properties file:

CASCIIANRC=/path/to/casciian.properties

Casciian runtime properties can therefore be supplied either through -D JVM options or through the file referenced by CASCIIANRC.

Maintenance

This release also includes:

  • corrected Javadoc warnings;
  • improved generic type documentation;
  • consistent troubleshooting report separators;
  • updated README content;
  • Apache 2.0 headers across newly added and modified source files;
  • synchronized 1.6.0 artifact versions.

Full changelog: v1.5.0...v1.6.0