#Converting hex color codes to skript color codes

1 messages · Page 1 of 1 (latest)

lapis grail
#
function lp(s: string) :: string:
  return ({_s}).replaceAll("&##([a-fA-F0-9]{6})", "<##$1>")
#

ADDONS Skript-Reflect

vast vigil
lapis grail
#

Just install Skript-Reflect

vast vigil
#

I almost figured out a way

#
    trigger:
        set {_d} to player's prefix
        replace all "##" in {_d} with "####"
        replace all "&" in {_d} with "><"
        add ">" to {_d}
        set {_e::*} to {_d} split at ""
        set {_e::1} to ""
        set {_f} to join {_e::*}
        send colored formatted {_f}```

Only problem is that it's for example <##123456x> instead of <##123456>x
#

@lapis grail how can I make it work?

hazy dome
#

pretty sure theres a snippet or something that has a regex pattern