パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v3.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日間ダウンロード
3.3万
いいね数
3
Pub ポイント
160

パッケージをインストール

flutter pub add console_color

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

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.

用途

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

主な機能

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

適している対象

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

注意事項

  • 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

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

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.

カテゴリー

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。

ランキング