colorize
colorize copied to clipboard
FR: gr[ea]y
Been loving this gem for years! Unfortunately, also for years, I've kept writing "something".grey
, only to end up in the sources again to remind myself that its called "light black" here. Is there any chance we could get #light_black
aliased to #grey
and #gray
?
@sixtyfive - hey, I love this gem too!
I submitted a proposed pull request for this. A couple things to consider:
-
I don't know how @fazibear feels about duplication of code / aliases for something that already works, but your request was simple enough that I felt I could try a PR for it
-
The automated workflow tests appear to be failing due to an unrelated
rubocop
thing (you can see the errors on the PR at the moment). I'm going to look into that and push another commit after I think I have it working
@sixtyfive - I just opened a different PR to address a bunch of rubocop issues. If either of my PRs wind up getting accepted then the rubocop one will likely go first, and it sort of blocks the PR for this issue.
The rubocop stuff was a few hours' work, and kind of needed to be done before any other code changes or PRs would be considered ... assuming that the goal is to keep this gem reasonably modern and supported by future Ruby versions.
Of course, this gem is so simple (in a good way) that I kind of doubt that any future ruby version is going to break it, but I figured I'd at least try to contribute to the (sometimes really boring) maintenance work.
Wow, I would have never guessed that rubocop would play a role in this. Might well have been the original reason then why fazibear kept with .light_black
. Thank you for your work on both things and looking forward to seeing the PRs hopefully getting accepted!
I wound up creating a very stripped down gem called tiny_color
for my own purposes. It lacks all but the most basic features of this gem, but it also covers all my use cases. I may add modes (underline, blink, etc.), but I won't be adding all the features this gem has.
I just released v1.1.0
, which includes aliases for light_black
, gray
, and grey
all pointing to the same thing.
Your choice of features is probably all 99% of users want. So thank you for uploading that!
There's also nothing wrong with colorize
- up until earlier today it served 100% of my needs, and I probably only created tiny_color
because I wanted to create it, not because colorize
is lacking anything I needed. colorize
has never broken any application that I've ever used it in, and it does what it says it will do year after year.
Added a bunch of modes.
Hi there! Thanks for all comments and contributions. I did't commit anything for years. But maybe it's time to make the gem up to date and release v1.0!
Fixed with #75