Pakete, Repositories und App-Kategorien suchen

Paketdetailsv3.0.0

console_color

The convenient enum of 256 colors for console. This library gives the color code for the console an easily recognizable name.

AndroidiOSLinuxmacOSWebWindows
30-Tage-Downloads
32.900
Likes
3
Pub-Punkte
160

Paket installieren

flutter pub add console_color

Paketübersicht

Aus öffentlichen Paketdaten erstellte Orientierung.

console_color is a Flutter/Dart package that provides a convenient enum of 256 console colors, assigning easily recognizable names to color codes. It simplifies terminal output formatting by allowing developers to use descriptive color names instead of raw ANSI codes. Ideal for logging, debugging, and enhancing console readability in command-line applications across multiple platforms.

Anwendungsfälle

  • Enhancing console logs with color
  • Debugging applications via colored output
  • Improving terminal-based UIs
  • Customizing CLI tool outputs
  • Logging with visual hierarchy

Hauptmerkmale

  • 256 predefined console colors
  • Simple enum-based API
  • Readable color names
  • Cross-platform support
  • Easy integration with print statements

Geeignet für

  • Developers building CLI tools
  • Teams improving debug visibility
  • Educational projects using console output
  • Applications requiring terminal colorization

Hinweise

  • Limited to console output only
  • No runtime color customization
  • Depends on terminal support for ANSI colors
  • Not suitable for GUI applications
  • Colors may not render consistently across all terminals

Original-README

Originaler README-Schnappschuss aus dem verknüpften Quell-Repository. Aktuelle Inhalte finden Sie im Repository.

1. About

The convenient enum of 256 colors for console. Console Color gives the color code for the console an easily recognizable name.

1.1. Introduction

1.1.1. Install Library

With Dart:

 dart pub add console_color

With Flutter:

 flutter pub add console_color
1.1.2. Import It
import 'package:console_color/console_color.dart';
1.1.3. Use library
import 'package:console_color/console_color.dart';

void main() {
  final color = ConsoleColor.cyan;
  print(color.name);
  print(color.code);

  for (final color in ConsoleColor.values) {
    print('name=${color.name}');
    print('code=${color.code}');
  }
}

1.2. License

Copyright (c) 2022, Kato Shinya. All rights reserved.
Use of this source code is governed by a
BSD-style license that can be found in the LICENSE file.

1.3. More Information

Console Color was designed and implemented by Kato Shinya.

Kategorien

Quell-Repository

Projekte, die dieses Paket verwenden

Noch keine Daten verfügbar.

Ranglisten