If you want to draw the panel on the right separately, this might work for you:
int b=0,g=255,r=255;
int y=50;
while(g>0)
{
b++;
g--;
r--;
y++;
Scalar color=Scalar(b,g,r);
rectangle(img,Point(200,y),Point(220,y+1),color,1);
}
Let me know if this gives the expected result.
source
share