This is the worst way to apologise.
If you feel what you said or how you behaved was you being your less-cultured self, please apologise.
If you do not feel so but the other person nonetheless felt bad, please apologise.
Bonus tip: A good apology never says: I am sorry if you were hurt. “If” implies condition, that you would not have been apologetic, unless it is for them feeling bad.
Additionally, apology should be plain, and simple, something like: I am sorry. I should not have done this. I will be careful going forward. No justification for what you did, even if you have one.
Every condition, every justification reduces the sanctity of your effort of apology.