Kanji Reading vs Vocabulary Reading

What you’re referring to is a dictionary convention to save space. That way they don’t have to use space labeling which readings are which, you can tell just by looking. It’s totally fine to refer to an onyomi in either hiragana or katakana, though sometimes you will see onyomi in katakana outside of dictionaries if they want to achieve a similar effect. Like, a quiz show might show a kanji’s onyomi in katakana to give it that feeling of being like a dictionary entry.

When you are actually writing a word in a real sentence, a lot of factors can determine whether you would choose hiragana, katakana, or kanji, but expressing the type of reading is almost never one of those factors. The word “kirei” might be written as きれい, キレイ, or 綺麗, depending on the overall style of the work and what the author wants to express (hiragana are often seen as softer, katakana as cooler, kanji as more formal, etc.).

That being said, if you want to use that dictionary convention as a visual guide here, there’s a user script that does it for you. Some people also do it to get more exposure to katakana. But don’t feel like you have to do it, or expect Japanese people to do this when they write.

Solo-kanji vocabulary items, since they are words as you would use them in sentences, fall into the same category as “kirei” as I was mentioning before. Which script you choose to write something in will depend on other factors.