This statement always makes me say “what?”.
There’s a mod for this editing some of the JSON but you can’t make the colors display in game using the debug menu.
You can set focus on the block, open the debug mode, open the debug info menu, scroll to target block information and see it there. This is fine if you’re running around with it open I guess but it’s not like the info is always right at your fingertips.
I do use the debug menu when i’m mining sometimes to keep an easy eye on elevation but it’s scrolled to a specific point and shrunken down and every time I might want to check some other info in it it’s still a matter of going to debug mode and resizing it to find the info i want and then getting it reset to the way I usually use it.
If you just want to find the index number for a color name you see on your screen it’s almost as easy to just open character customization and find it there on either platform.
EDIT: editing to add that using the JSON file mod to add numbers to color names also interferes with other parts of the game like custom colors in settlement names.