You can use $replace($1-,$me,colored $me) to highlight only your nickname or if ($me isin $1-) to highlight whole text

Code:
on ^*:TEXT:*:*: {
  haltdef
  if !$chan {

    ...code...

  }
  else {
    ; so text is #channel text.. echo to $chan

    var %n = $iif($nick !isreg $chan,$left($nick($chan,$nick).pnick,1) $chr(240))

    ; highlight whole text
    if $me isin $1- { var %text = $+(10,$1-,) }

    ; highlight only yournick
    var %text = $replace($1-,$me,$+(4,$me,))
    
    ; echo %text here
    echo -tm $chan $+(3<,$chr(2),$chr(3),$+($replace(%n,@,4@,&,4&,%,14%,~,4~,+,5+,$chr(240),),15),$nick,$chr(2),$chr(3),3>) %text
  }
}