Fetch and store color value in a variable

mini prashanth <[email protected]>
Newsgroups gmane.comp.video.image-magick.user
Message-ID <[email protected]>
Hi,
Iam basically trying to fetch the color value of the pixel at position 0,0 and store it in the hex format "#cccccc" in a variable . 

FOR /F %%i IN ('identify -format "%%[fx:p{0,0}]" "img.jpg"') DO SET x=%%i (here iam getting some decimal value like x=0.298110)

I tried to change it into Hex value by using this..

For /F %%s IN ('EVAL "rgb(%x%)"') Do SET hexColor=%%s

This is not working ..Please Help

Regards,
Mini
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.