Skip to content
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

Full colour and font support for RawText #66

Open
AmauryCarrade opened this issue Dec 10, 2020 · 0 comments
Open

Full colour and font support for RawText #66

AmauryCarrade opened this issue Dec 10, 2020 · 0 comments
Labels
C ⋅ Tools Component – Uncategorized tools T ⋅ Feature Type – Feature Request

Comments

@AmauryCarrade
Copy link
Member

Since 20w17a, JSON formatted content accept arbitrary fonts and colours (in hex), like so:

{"text":"Beautiful green","color":"#3f9718", "font": "minecraft:default"}

First thing first, we should accept those in RawText, with something like this:

new RawText("Beautiful green").color("#3f9718").font("minecraft:default")

or:

new RawText("Beautiful green").color(new Color(63, 151, 24)).font(namespacedKey)

Also, I think it would be great if our legacy-to-json converter could accept these colours, using a custom syntax. Something like §#3f9718Green message could do, but if we decide to go this way, it won't be possible to use ChatColor.translateAlternateColorCodes to convert from &-based formatting to §-based, if using this feature.

But it would allow to use arbitrary colours in places where JSON format is accepted while being simple (e.g. in configuration files). With sufficient warnings, it could be really useful.

@AmauryCarrade AmauryCarrade added C ⋅ Tools Component – Uncategorized tools T ⋅ Feature Type – Feature Request labels Dec 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C ⋅ Tools Component – Uncategorized tools T ⋅ Feature Type – Feature Request
Projects
None yet
Development

No branches or pull requests

1 participant