nunomaduro / laravel-console-menu

🔘 Beautiful PHP CLI menus. Is a php-school/cli-menu wrapper for Laravel/Artisan Console Commands
MIT License
802 stars 40 forks source link

How to inherit terminal color #4

Closed mikeerickson closed 6 years ago

mikeerickson commented 6 years ago

Playing around with project and I see an issue which I am not sure how to handle. I know I can define the background color, but I am looking for a way to use the terminal background? I see it is using a default of light blue which is tough to read (see screenshot).

image

nunomaduro commented 6 years ago

@mikeerickson Check if you find something on this readme: https://github.com/php-school/cli-menu.

mikeerickson commented 6 years ago

Nope, nothing in there which outlines how this can be done.

I will see if I can figure out something and PR. Then you can determine if you want to add to master

mikeerickson commented 6 years ago

@nunomaduro FYI, this is what is necessary to provide what i was looking for (supply default with setBackgroundColour command)

NOTE: If you dont supply the setBackgroundColour, it uses what is displayed in above screenshot

$options = ['Item1','Item2'];
$option = $this->menu('Select Command:', $options)
    ->setForegroundColour('green')
    ->setBackgroundColour('default')
nunomaduro commented 6 years ago

@mikeerickson Nice! Thanks for the info! 👍