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
ANSI 256 as #3-tuples #26
Comments
Just so I don't misunderstand: the I also immediately thought it would cause confusion with people used to short hex codes in CSS. Thus I would prefer another prefix. Apart from |
This comment was marked as outdated.
This comment was marked as outdated.
Woopsie! Because you replied via mail, GitHub detected those the things around |
Any specific reason you would force users to add leading 0s? The syntax would be unambiguous even for |
Looked more consistent to me, comparing with RGB hex. But it's probably better to just use short numbers, given that all docs on ANSI present them without leading zeros. |
Okay yeah, I would also not force leading zeros I think. I guess then we have a plan. Do you wanna give it a try and prepare a PR? Otherwise I might do it in the near future -- no promises tho! |
I still have to learn Rust and use it to port a project (using bunt ;), so it's going to take some time for me as well. |
Then I will have a stab at it I guess! I hope you're enjoying Rust so far ;-) |
Fixed in fc63556 and released as v0.2.8 |
Docs says "there is currently no syntax for Color::Ansi256 because I couldn’t come up with a nice syntax and I never used these ansi colors…)". I do need those ones.
What about just using a
#123
syntax? If RGB should always be 6-tuple strings, then there is no ambiguity with ANSI's 256 3-tuple.The meaning should be straigthforward, but may collides in users mind with CSS' short 3-tuple RGB (for which
#fff
is a valid shortcut for#ffffff
).Alternatively, any other prefix may be used, like
@
, which reminds the A of ANSI.The text was updated successfully, but these errors were encountered: