Skip to content

Commit d67431c

Browse files
committed
add new method for output simple colored text
1 parent 03d846f commit d67431c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/Utils/Show.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,16 @@ public static function __callStatic($method, array $args = [])
180180
throw new \LogicException("Call a not exists method: $method");
181181
}
182182

183+
/**
184+
* @param string $text
185+
* @param string $style
186+
* @param bool $nl
187+
*/
188+
public static function color(string $text, string $style = 'info', $nl = true)
189+
{
190+
self::write(Helper::wrapTag($text, $style), $nl);
191+
}
192+
183193
/**************************************************************************************************
184194
* Output Format Message(section/list/helpPanel/panel/table)
185195
**************************************************************************************************/

0 commit comments

Comments
 (0)