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

Last hex color of string #5040

Open
1 task done
AdeptOreo opened this issue Aug 22, 2022 · 0 comments
Open
1 task done

Last hex color of string #5040

AdeptOreo opened this issue Aug 22, 2022 · 0 comments
Labels
enhancement Feature request, an issue about something that could be improved, or a PR improving something. PR available Issues which have a yet-to-be merged PR resolving it priority: lowest "Nice to have" updates that are not required (tiny low impact bug fixes or QoL enhancements).

Comments

@AdeptOreo
Copy link

Suggestion

It would be nice to have an expression which would return the last/first hex color of a string. I had a look at "last color of ..." expression of Skript, but it won't return a hex color.
I have tried multiple ways to get the last hex color of a string, using subtext, last 6-16 characters of the string, but nothing really worked. Also tried splitting the string at "" and get the last elements of the array, but that didn't work out either.

Why?

It would be really useful, since there isn't a "clear" way to do this and it would make this waaay easier.

Other

I had a look at the code behind "last color of ..." expression and seen that it's using org.bukkit.ChatColor's getLastColors() method, which doesn't seem to work with hex colors.

Agreement

  • I have read the guidelines above and affirm I am following them with this suggestion.
@AyhamAl-Ali AyhamAl-Ali added enhancement Feature request, an issue about something that could be improved, or a PR improving something. priority: lowest "Nice to have" updates that are not required (tiny low impact bug fixes or QoL enhancements). labels Aug 22, 2022
@Efnilite Efnilite added the PR available Issues which have a yet-to-be merged PR resolving it label Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature request, an issue about something that could be improved, or a PR improving something. PR available Issues which have a yet-to-be merged PR resolving it priority: lowest "Nice to have" updates that are not required (tiny low impact bug fixes or QoL enhancements).
Projects
None yet
Development

No branches or pull requests

3 participants