패키지, 저장소 및 앱 카테고리 검색

패키지 상세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.

카테고리

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.

순위