<div dir="ltr">If I was in your place, I would just load xecolour package and usecolour without any issue in bidirectional texts so in your example this is how you could use it:<br><br>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<br>
\documentclass{article}<br>\usepackage{xecolour}<br>\usepackage{fontspec}<br>\usepackage[fullvoc,fdf2noalif]{arabxetex}<br>\newfontinstance\arabicfont[Script=Arabic,Scale=1.2,WordSpace=2]{XB Zar}<br><br>\begin{document}<br>
<br>\LARGE<br><br>\begin{arab}<br><br>اعْلَمْ‏ ‬بِأَنَّ<br>\green{الرّاست}<br>  ‬أَصْلٌ‏ ‬مُسْتَقِلْ<br><br>\end{arab}<br><br>\end{document}<br>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<br><br><br>so it gives you the result you want and it supports colour spanning multiple lines.<br>
<br>However you still can use color or xcolor package but it will not support colour spanning multiple lines in RTL mode, so if you decide to go this way put this code at the preamble of your document after loading bidi package<br>
<br>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<br>\makeatletter<br>\newcommand{\green}[1]{\beginL{\color{green}\if@RTL\beginR\fi#1\if@RTL\endR\fi}\endL}<br>\makeatother<br>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<br>
</div>