Though this has been answered, I'll just tack this on the necro to add more helps to fly-by-nighters:
The newer versions of Minecraft won't expect its users to use "exotic" codes other than the language glyphs acceptable in the locale for which it is configured. The §-color code is the go-to method of coding colors and most modders will go with it just for simplicity and because many expect that to be used by most mods/plugins/data packs and therefore will rely on them.
Unfortunately, most codes can't be entered into the standard text field configs anymore because mods are far less as much injected into the original Minecraft like they were back in earlier versions and language support has more defined rules now than ever.
The best advice I can give is to just open config files directly, most mod config settings GUIs will also have a .json or .toml configuration file where the settings are actually stored. If you edit that with your plain text editor, you should have no problem entering it there, as you already know - just be sure to save the file in the same encoding as it was when you opened it else there may be problems especially if a BOM gets introduced when the game doesn't expect one.
Just be advised if you change settings files, make a backup before you change stuff as anything could happen. Funny story: I had edited a config and left it open, my cat walked across my keyboard while I wasn't looking. The last thing that got stepped on was the arrow key (I think), which scrolled it back down to where I didn't see my cat's "changes", and then saved what I thought was a valid file, only to find that the game was NOT happy... like not at all :)
(I really have to stop writing novels...)
TL;DR: Short version, just edit config files directly, new minecraft, even modded minecraft, usually wont let you enter in § directly.