When an Ominous Banner is renamed with an anvil, it loses its rarity color. The other items with rarity color can be renamed without losing it. How to reproduce
[media]
Generate a Pillager Outpost
/place structure minecraft:pillager_outpost
Take an Ominous Banner from the structure
Rename it in an anvil ❌ See if it kept its rarity color after renaming it
Get another item with rarity color (e.g. golden apple) and repeat step 3
This is likely due to it being a custom name color rather than a true rarity color. An easy fix for this would be to split off ominous banners into their own ID (which would fix many other things), and create a proper "Ominous" rarity which applies to them.
This is likely due to it being a custom name color rather than a true rarity color. An easy fix for this would be to split off ominous banners into their own ID (which would fix many other things), and create a proper "Ominous" rarity which applies to them.