justplainsoccer Posted December 14, 2003 Posted December 14, 2003 how might i go about retrieving a hexadecimal number (#0000FF) from a color dialog. i got the dialog to open but i cant figure out what to use for hexa. Quote
HJB417 Posted December 14, 2003 Posted December 14, 2003 The Color struct has a method, ToArgb. The ColorDialog returns a Color object. Which is the color the user selected. Just convert that int to hex using ToArgb().ToString("x") and you should be good Quote
justplainsoccer Posted December 14, 2003 Author Posted December 14, 2003 thanks, works great. but it appears to have a leading "ff" on it Quote
HJB417 Posted December 14, 2003 Posted December 14, 2003 remember...... it's returning red, green, blue AND ALPHA (not in that order though) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.