Aptivi - Stable Manuals
ProjectsWebsiteBlog
Terminaux 7.0 Beta 1 - Manual
Terminaux 7.0 Beta 1 - Manual
  • Welcome!
  • Breaking changes
    • API v1.0
    • API v2.0
    • API v3.0
    • API v4.0
    • API v5.0
    • API v6.0
    • API v7.0
  • Usage
    • Preface
    • Console Tools
      • Console Checker
        • Console Size Requirements
      • Image Rendering
        • Icons
      • Console Writers
        • Individual Writers
        • Cyclic Writers
          • Geometric Shapes
          • Charts
          • Text
          • Artistic
          • Progress Bars
          • Lists and Calendars
          • Miscellaneous
        • Informational Boxes
      • Textual UI
        • Interactive TUI
        • Console Screen
        • Console Resize Listener
        • VT Sequences
      • Console Wrapper
      • Console Colors
      • Color Templates
      • Presentation System
      • Console Extensions
      • Nerd Fonts
      • Terminal Info
      • Test Fixtures
      • Terminal Structures
      • Console Logging
    • Input Reader
      • Shells
        • Shell Structure
          • Help System
          • Command Parsing
          • Command Information
          • Command Switches
          • Shell Presets
          • Command Aliasing
      • Other Input
        • Keybindings
        • Choice-based inputs
        • Editors and Viewers
        • Figlet Font Selector
        • Color Wheel
        • Spinner Selector
        • Input Modules
      • Reader State
      • Reader Settings
      • Syntax Highlighting
      • Pointer Events
    • Color Sequences
      • Color Model Conversions
      • Color Model Parsing
      • Interop with System.Drawing.Color
  • Report an issue
  • Source code
  • API Reference
Powered by GitBook
On this page
Edit on GitHub
  1. Usage
  2. Color Sequences

Interop with System.Drawing.Color

Terminaux's Color meets System.Drawing's Color!

Since Terminaux 2.5.0, we've introduced a new way to interact with System.Drawing's struct! You can find all the tools in the SystemColorConverter class under Terminaux.Colors.Interop. The Color struct from System.Drawing represents the four color components:

  • Alpha (A): Color opaqueness level. 0% means 100% transparency.

  • Red (R): Red color level.

  • Green (G): Green color level.

  • Blue (B): Blue color level.

This class provides the following functions:

SystemColorConverter.cs
public static OurColor FromDrawingColor(DrawingColor drawingColor)
public static DrawingColor ToDrawingColor(OurColor ourColor)

Depending on your use-case, the two functions are appropriate when:

  • you're looking to make an instance of Terminaux's Color from System.Drawing.Color instance. In this situation, you'll have to use the FromDrawingColor() function.

  • you're looking to make an instance of System.Drawing's Color from Terminaux's Color instance. In this situation, you'll have to use the ToDrawingColor() function.

This is useful if you're interacting with applications that use System.Drawing's Color.

Color