<commit_before># BashColor
Generate command line colorized text.

给命令行文字添加前景/背景色、以及修饰效果。

# Usage

```php
use Overtrue\BashColor\BashColor;

echo BashColor::render('<fg=green>Are you sure ?</><fg=yellow> [Y/n]:</>'), "\n";
echo BashColor::render('<bg=yellow;>hello world!</>'), "\n";
echo BashColor::render('<fg=green;opt=bold>yes!</>'), "\n";
echo BashColor::render('<fg=cyan;opt=bold;bg=red>ugly!</>'), "\n";
```

### Attributes

- fg foreground color.
- bg background color.
- opt option.

### foreground

```
'default'       // Default (usually green, white or light gray)
'black'         // Black
'red'           // Red (don't use with green background)
'green'         // Green
'yellow'        // Yellow
'blue'          // Blue
'magenta'       // Magenta/Purple
'purple'        // Magenta/Purple
'cyan'          // Cyan
'light_gray'    // Light Gray
'dark_gray'     // Dark Gray
'light_red'     // Light Red
'light_green'   // Light Green
'light_yellow'  // Light Yellow
'light_blue'    // Light Blue
'light_magenta' // Light Magenta/pink
'light_pink'    // Light Magenta/pink
'light_cyan'    // Light Cyan<commit_msg>Update readme.<commit_after># BashColor
Generate command line colorized text.

给命令行文字添加前景/背景色、以及修饰效果。

# Usage

```php
use Overtrue\BashColor\BashColor;

echo BashColor::render('<fg=green>Are you sure ?</><fg=yellow> [Y/n]:</>'), "\n";
echo BashColor::render('<bg=yellow;>hello world!</>'), "\n";
echo BashColor::render('<fg=green;opt=bold>yes!</>'), "\n";
echo BashColor::render('<fg=cyan;opt=bold;bg=red>ugly!</>'), "\n";
```

### Attributes

- `fg` foreground color.
- `bg` background color.
- `opt` option.

### foreground

```
'default'       // Default (usually green, white or light gray)
'black'         // Black
'red'           // Red (don't use with green background)
'green'         // Green
'yellow'        // Yellow
'blue'          // Blue
'magenta'       // Magenta/Purple
'purple'        // Magenta/Purple
'cyan'          // Cyan
'light_gray'    // Light Gray
'dark_gray'     // Dark Gray
'light_red'     // Light Red
'light_green'   // Light Green
'light_yellow'  // Light Yellow
'light_blue'    // Light Blue
'light_magenta' // Light Magenta/pink
'light_pink'    // Light Magenta/pink
'light_cyan'    // Light Cyan
{'fraction_non_alphanumeric': 0.18403547671840353, 'fraction_numerical': 0.0, 'mean_word_length': 2.992920353982301, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4056744', 'n_tokens_mistral': 838, 'n_tokens_neox': 819, 'n_words': 190}