I'm from the UK, but will use US spellings in some contexts. Programming languages generally use US spellings, the HTML
center tag or the CSS
color property for example, and it can be a bit jarring to write stuff like "use
color to set the colour". Another issue is that spell checkers are always either US or UK, so you end up with loads of red lines on correct spellings if you use a UK spellchecker to discuss code.
Generally speaking, you can use either UK or US spellings, even when addressing one or the other audience (I've never known anyone that objected); just be consistent.