Hi Lasse,<br><br>Check out the GetColor() function.<br><br><i>Displays the Windows Color dialog box and returns the color number of the chosen color.</i><br><br>It's like you formulated your question from the function description. <br><br>Jon <p>Jon<br><a href=mailto: > </a><br><a href= > </a><br>Carpe Diem!
*-- Lasse<br>*<br>*-- If you need to return the RBG Values from the no <br>*-- returned by GETCOLOR(), the following program/code <br>*-- may help<br><br>CLEA<br>STORE 0 to r,g,b<br>getRGB(getColor(),@r,@g,@b)<br><br>? r && The R value<br>? g && The G value<br>? b && The B value<br><br>**********************************<br>PROCEDURE getRGB(ColorNo,red,green,blue)<br><br>PRIVATE p,i<br><br>p = (256 ^ 2)<br>i = INT(ColorNo / p)<br>blue = i<br>ColorNo = ColorNo - (i * p)<br>p = (256 ^ 1)<br>i = INT(ColorNo / p)<br>green = i<br>ColorNo = ColorNo - (i * p)<br>red = INT(ColorNo)<br><br><br>* Chris<br>* EOF
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.