We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

ColorPickerButton not setting black color correctly

Thread ID:





96001 Aug 14,2010 10:56 AM UTC Aug 17,2010 12:19 PM UTC ASP.NET Web Forms (Classic) 1
Tags: Tools
Administrator [Syncfusion]
Asked On August 14, 2010 10:56 AM UTC

I have an application where the users can set their own screen colors by using the ColorPickerButton. This includes custom colors outside of the usual "known color" range. The selected color is then stored as an argb number in an XML file which can be read when the screen reloads.

However, the SelectedColor property of the ColorPickerButton appears to convert black to white when displaying the color palette. The following sample code was used to generate the screen shots attached:

Private Sub Form1_Load( _
ByVal sender As Object, _
ByVal e As System.EventArgs) _
Handles _

ColorPickerButton1.SelectedColor = Color.FromArgb(255, 255, 255, 255)
' ColorPickerButton1.SelectedColor = Color.FromArgb(255, 0, 0, 0)

End Sub

As you can see both lines of code result in the white colored square being given the focus. Although only a minor problem, black is likely to get heavily used as the color for screen text. The SelectedColor property also appears to work OK with a "KnownColor", but that option is not open to me as users have the choice of potentially 16M colors which are stored as argb's.

I have also noticed that on occasion, other known colors appear to suffer the same problem and although the problem appears random, I suspect that the difficulty with the black/white colors may be the cause.

Any workaround you can provide would be appreciated, otherwise I will create a direct-trac incident if required.


Steve Graham


Lingaraj S [Syncfusion]
Replied On August 17, 2010 12:19 PM UTC

Hi Steve,

Thank you for your interest in Syncfusion products. Also regret for the inconvenience. By default, ColorUIControl does not allow to select the UnKnownColors. So please try using standard KnowColors with ColorUIControl.

this.colorPickerButton1.SelectedColor = Color.Black;

Please let me know if you have any other concerns.

Lingaraj S.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon