-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Mention supported hex colors #14494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mention supported hex colors #14494
Conversation
Thank you for this contribution, just a minor comment from my side.
Can you explain this a little bit "better" or add an example? Thanks |
console/coloring.rst
Outdated
@@ -40,13 +40,18 @@ It is possible to define your own styles using the | |||
use Symfony\Component\Console\Formatter\OutputFormatterStyle; | |||
|
|||
// ... | |||
$outputStyle = new OutputFormatterStyle('red', 'yellow', ['bold', 'blink']); | |||
$outputStyle = new OutputFormatterStyle('#F00', 'yellow', ['bold', 'blink']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you should mentioned that this only works for sf5.2+ no?
Maybe keep the previous code and add the new code hex with those explanations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's why is this pull request made into 5.x branch instead of lower version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes of course, I meant adding a version added docbloc for this version :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry I didn't knew that. I added that versionadded
and switched red back to previous and changed yellow to hex code. Or do you prefer duplicating that piece of code with note that since 5.2 it can be defined as hexa?
@OskarStark thanks, good point. I also made a test for that hidden feature symfony/symfony#38866 |
This PR was squashed before being merged into the 5.2-dev branch. Discussion ---------- [Console] Test degraded true colors | Q | A | ------------- | --- | Branch? | 5.x | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT | Doc PR | symfony/symfony-docs#14494 <!-- required for new features --> Testing hidden feature of hex colors degraded to ANSI named colors for terminals without true color support. Commits ------- a26dc09 [Console] Test degraded true colors
This PR was squashed before being merged into the 5.2-dev branch. Discussion ---------- [Console] Test degraded true colors | Q | A | ------------- | --- | Branch? | 5.x | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT | Doc PR | symfony/symfony-docs#14494 <!-- required for new features --> Testing hidden feature of hex colors degraded to ANSI named colors for terminals without true color support. Commits ------- a26dc0931b [Console] Test degraded true colors
a35bab8
to
64058aa
Compare
Thanks Marek for working on this feature, this is much appreciated and congrats on your first contribution to the Symfony docs 🎉 |
Mention supported hex colors for foreground and background
Fixes #13795