tcprintf : ANSI colored output in terminal

버전 1.0.0.0 (161 KB) 작성자: Daniel J O'Shea
tcprintf provides colored output when using MATLAB from a terminal using ANSI escape codes.
다운로드 수: 857
업데이트 날짜: 2012/9/20

라이선스 보기

Uses ANSI escape codes to print colored output when using MATLAB
from a terminal. If not running in a terminal, or if called by MATLAB's
datatipinfo function, tcprintf reverts to standard printf. The latter is
desirable if tcprintf is used within an object's disp() method to avoid
seeing the ANSI characters here.

The first argument is an style description that consists of space-separated
words. These words may include:

one of the following colors:
black, red, green, yellow, blue, purple, cyan, darkGray, lightGray, white

one of the following background colors:
onBlack, onRed, onGreen, onYellow, onBlue, onPurple, onCyan, onWhite

and any of the following modifiers:
bright : use the bright (or bold) form of the color, not applicable for
black, darkGray, lightGray, or white
underline : draw an underline under each character
blink : This is a mistake. Please don't use this ever.

Example:
tcprintf('lightGray onRed underline', 'Message: %20s\n', msg);

Author: Dan O'Shea (http://djoshea.com) (c) 2012

Released under the open source BSD license
http://opensource.org/licenses/bsd-license.php

인용 양식

Daniel J O'Shea (2024). tcprintf : ANSI colored output in terminal (https://www.mathworks.com/matlabcentral/fileexchange/38252-tcprintf-ansi-colored-output-in-terminal), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2011b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Debugging and Analysis에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0