Code
on *:text:*:#channel:{
  if ($me isop $chan) {
    if ($chr(3) isin $1-) { ban -k $chan $nick 2 Colour is not allowed. } 
  }
}


Replace #channel with your channel name.

The "2" makes the script ban *!*@host If you want something different, take a look at $mask


/help ban
/help $mask

or

https://en.wikichip.org/wiki/mirc/commands/ban
https://en.wikichip.org/wiki/mirc/identifiers/$mask