colored icon indicating copy to clipboard operation
colored copied to clipboard

Use a macro to declare all colorized colors

Open sameer opened this issue 5 years ago • 6 comments

Just simplifying this a bit.

I'm also preparing to implement #48, and it looks like we need a ColorizedStr since a String cannot be created in a const fn.

sameer avatar Jul 21 '20 15:07 sameer

Could this be expanded to include more colors like gray for example? Not sure if I should open a new issue for this as it seems to fit great here to be honest :)

mainrs avatar Aug 04 '20 12:08 mainrs

I think it would need to be a separate PR, gray is not in the color enum

sameer avatar Aug 04 '20 14:08 sameer

I wonder what the decision was behind the colors. I expected all ANSI colors to be in there 🤔

mainrs avatar Aug 04 '20 14:08 mainrs

Actually, maybe gray is already there.

https://en.wikipedia.org/wiki/ANSI_escape_code#3/4_bit

"bright black" = gray, white = light gray, and bright white = white

So then this would just be like adding a nickname for bright black (i.e. already done for magenta & purple), in which case I could add it here.

sameer avatar Aug 04 '20 14:08 sameer

Maybe the nicknames should be put into a separate PR. But I like the idea :)

mainrs avatar Aug 04 '20 15:08 mainrs

I like this, cuz the same idea occurred to me while checking the source. Any plans on merging?

rickygao avatar Feb 24 '21 07:02 rickygao

Requiring paste dependency is not worth the gain in terseness.

kurtlawrence avatar Dec 10 '23 01:12 kurtlawrence