NeoKolors.Tui.Core 2026.2.0-rc2.2

This is a prerelease version of NeoKolors.Tui.Core.
dotnet add package NeoKolors.Tui.Core --version 2026.2.0-rc2.2
                    
NuGet\Install-Package NeoKolors.Tui.Core -Version 2026.2.0-rc2.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NeoKolors.Tui.Core" Version="2026.2.0-rc2.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NeoKolors.Tui.Core" Version="2026.2.0-rc2.2" />
                    
Directory.Packages.props
<PackageReference Include="NeoKolors.Tui.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add NeoKolors.Tui.Core --version 2026.2.0-rc2.2
                    
#r "nuget: NeoKolors.Tui.Core, 2026.2.0-rc2.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package NeoKolors.Tui.Core@2026.2.0-rc2.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=NeoKolors.Tui.Core&version=2026.2.0-rc2.2&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=NeoKolors.Tui.Core&version=2026.2.0-rc2.2&prerelease
                    
Install as a Cake Tool

NeoKolors.Tui.Core

Build Status Test Status NuGet Version NuGet Downloads License

NeoKolors.Tui.Core provides the core double-buffered visual canvas, geometry abstractions, border styles, and screen rendering drivers that power the NeoKolors TUI framework. It manages the low-level visual grid of character cells, tracking styling state changes and outputting compiled ANSI update buffers to the console.


Core Features

  • Double-Buffered Grid Canvas:
    • ICharCanvas & NKCharCanvas: Represent a mutable 2D grid containing character cells, styling metadata, and Z-Index depth layers. Can dynamically resize, clear, or lay out nested canvases.
  • Console Render Screen:
    • ICharScreen & NKCharScreen: Manage the primary terminal screen state, writing diffed grid segments into a single compiled ANSI escape stream to minimize redraw flicker.
  • Customizable Borders:
    • BorderStyle: Models border configurations (top, bottom, left, right sides, and corners) with custom style attributes. Includes built-in parsers and predefined styles (such as Ascii, Normal, Rounded, Thick, Double, Inset, and Outset).
  • Canvas Drawing Helpers:
    • CharCanvasExtensions: Extends the base canvas interface to support drawing borders, rectangles, filling background areas, and styling specific regions.
  • Sixel Image Support:
    • Directly place pixel images (ISixelImageInfo) onto canvas layer offsets, translating pixel maps into console coordinates.

Core Types and Abstractions

1. ICharCanvas

The interface defining operations for visual grid modification:

  • Width / Height / Size: Dimensions of the current canvas.
  • this[x, y]: Retrieves or assigns a CellInfo object containing character and style details.
  • Place(): Places sub-canvases, character grids, styled strings, or raw character codes at specific offsets and depth layers.
  • PlaceSixel(): Allocates an image buffer to be drawn on terminal screens.

2. BorderStyle

Predefined styles for box borders:

  • GetAscii(): Prints borders using standard ASCII characters (+, -, |).
  • GetRounded(): Uses box-drawing characters featuring rounded corners (╭, ╮, ╰, ╯).
  • GetThick() / GetDouble(): Pre-configured thick or double-line box margins.
  • GetInset() / GetOutset(): Utilizes shadows and highlights to simulate 3D inset/outset framing.

Usage Examples

1. Drawing Styled Rectangles

Using drawing extensions to draw borders and fill backgrounds:

using Metriks;
using NeoKolors.Common;
using NeoKolors.Tui.Core;

// Create a visual canvas
var canvas = new NKCharCanvas(80, 24);

// Define a region and border style
var region = new Rectangle(new Point2D(5, 2), new Point2D(25, 8));
var border = BorderStyle.GetRounded(NKColor.FromRgb(0, 255, 128));

// Draw the rounded border
canvas.PlaceRectangle(region, border);

// Apply a background color to the inner area
var innerRegion = new Rectangle(new Point2D(6, 3), new Point2D(24, 7));
canvas.StyleBackground(innerRegion, NKColor.FromRgb(32, 32, 32));

2. Rendering the Screen Buffer

Setting up a screen and executing render cycles:

using Metriks;
using NeoKolors.Tui.Core;

var screenSize = new Size2D(120, 40);
var screen = new NKCharScreen(screenSize);

// Draw static text
screen.Place("NeoKolors TUI Core Engine", new Point2D(2, 1));

// Render changes to the console stream
screen.Render();
Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on NeoKolors.Tui.Core:

Package Downloads
NeoKolors.Tui

Package Description

NeoKolors.Tui.Fonts

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2026.2.0-rc2.2 81 6/8/2026
2026.2.0-rc2.1 69 6/5/2026
2026.2.0-rc2 86 6/5/2026
2026.2.0-rc1 60 6/4/2026