Haki is canonically invisible. Haki can only be sensed by people who know of it.
Oda just decided to make Haki visible when he felt like it. And I hate it.
haki is visible when you use Armament Hardening/Busoshoku Koka, a specific move that involves concentrating haki and making something physically harder and turn black. You can use haki without using this move.
The idea that goes around a lot on reddit and in powerscaler youtuber communities or whatever that hardening is just the regular use of armament and Oda is randomly drawing it colored in sometimes for random reasons is wrong, and headcanon that is never backed up by the manga or sbs.
If you use haki, normally, it's invisible.
If you concentrate haki into something to make it harder/heavier/more durable/etc, that's a specific move that people only do sometimes, and it makes the haki visible. People in the story and other oda-created material comment on this several times (vergo in punk hazard is intimidating because he's using full body hardening, not because he took his shirt off. law in dressrosa looks at luffy using full body hardening in g4 and worries about him using too much haki. the famous scene with mihawk explaining that anyone can turn a sword black with haki because you see it turn black, with your eyes. oda created a character named Black Arm Zephyr because of his mastery of Armament Hardening physically turning his arm black and people being able to see it.) even though its popular to say no one ever acts like they can see it.
If you shoot haki out like a barrier, like sentomaru, rayleigh, the boa sisters, luffy etc do, that's another, different specific move that people only do sometimes, and this is invisible.
If you concentrate haki into something offensively, to damage it from inside, thats another, ANOTHER different specific move. All of these things can also be layered on top of each other.