I introduced colour to a QED command, but the colour has side effect on the text that follows it. I want the colour to be restricted to the symbol only.
\documentclass[a4paper,12pt]{article}
\usepackage{xcolor}
\ExplSyntaxOn
\definecolor{dblue}{RGB}{0,0,139}
\colorlet{celestk}{dblue}
\NewDocumentCommand{\wvQed}{O{celestk}o}
{
\IfNoValueTF{#2}{\color{#1}}{\color[#1]{#2}}
\hfill\nabla
}
\ExplSyntaxOff
\begin{document}
Tantra is an Expansion Device. \wvQed
The word appears in the hymns of the Rigveda such as in 10.71
\end{document}

$. As requested before, please make sure your code compiles and please link and attribute when you use code provided by others. Strictly speaking, this is a legal requirement of SE's licence. (Though I don't know how much would be considered subject to copyright.) – cfr Oct 16 '23 at 00:09