title: OpenCV: convert Scalar to different color space
body: <p>I am using a <code>Scalar</code> to define the color of a rectangle I am drawing with <code>OpenCV</code>:</p>
  
  <pre><code>rectangle(imgOriginal, Point(0, 0), Point(25, 50), Scalar(H, S, V), CV_FILLED);
  </code></pre>
  
  <p>However, the color is defined in HSV color space rather than RGB (<code>imgOriginal</code> is RGB). </p>
  
  <p>How do I convert <code>Scalar</code> (or its input, the integer variables <code>H</code>, <code>S</code>, and <code>V</code>) to RGB?</p>
  
  <p>(So far I only found answers telling me how to convert a whole image with <code>cvtColor</code> which is not what I want.)</p>