-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexample_colored.php
More file actions
30 lines (23 loc) · 951 Bytes
/
example_colored.php
File metadata and controls
30 lines (23 loc) · 951 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
require __DIR__ . '/../vendor/autoload.php';
$cli = new WizardCLI\WizardCLI(['theme' => 'wizard']);
$cli->art("WizardCLI Colors Demo");
$cli->color("🧙 Welcome to the magical CLI!", "magenta+bold");
$cli->color("This is a test in blue.", "blue");
$cli->color("Success in green.", "green+bold");
// Simple color
$cli->color("Blue text", "blue");
$cli->color("Red and bold!", "red+bold");
$cli->color("Green + underline", "green+underline");
// Multiline and strong styles
$cli->color("🌟 Magical Bold Magenta 🌟", "magenta+bold");
$cli->color("Grey dim", "gray+dim");
$cli->color("Cyan underline", "cyan+underline");
// Loop through all colors/styles
$styles = ["red", "green", "yellow", "blue", "magenta", "cyan", "white", "gray"];
foreach ($styles as $style) {
$cli->color("This is $style!", "$style+bold");
}
// Combine styles
$cli->color("Bold Underlined Gold", "yellow+bold+underline");
$cli->color("Dim Blue", "blue+dim");