When I open a colour dialog, there is a large "spectrum" box
which allows me to select a colour (in addition to the basic
colour boxes, and the custom colour boxes). Clicking
(initially) in the large spectrum box changes the Hue and
Saturation, but not the Luminosity, and it also does not
change the RGB values, nor the sample colour box.
This is because the basic colour selected on the left is black, that has no Luminosity nor RGB components (other than zero, obviously). If you select another colour, the luminosity and RGB values change accordingly. You can try to call your colourdialog in this way:
This is on Win XP, Python 2.4.1, wxPython 2.6.1.0 (tiny dumb sample
attached).
When I open a colour dialog, there is a large "spectrum" box
which allows me to select a colour (in addition to the basic
colour boxes, and the custom colour boxes). Clicking
(initially) in the large spectrum box changes the Hue and
Saturation, but not the Luminosity, and it also does not
change the RGB values, nor the sample colour box. If I
"accept" this then it returns with the colour values
unchanged (kind of contrary to my expectations, since I
clocked on the colour I wanted, and didn't notice until I was
testing in detail to write this email that the colour sample
box didn't change).
However, if I click on one of the basic colour boxes, then
the sample colour box, and the HSL and RGB values all update.
Subsequently, clicking within the "spectrum" box causes all
value to update, and to be returned on "accept".
Until - I select either the black or white basic colour box
(bottom left or bottom right boxes), at which point the
spectrum goes back to ineffective.
Is that correct behaviour ?
Doesn't feel to me like it is - I expect clicking on a
colour pixel in the spectrum box to set that as the selected colour.
When I open a colour dialog, there is a large "spectrum" box which allows me to select a colour (in addition to the basic colour boxes, and the custom colour boxes). Clicking (initially) in the large spectrum box changes the Hue and Saturation, but not the Luminosity, and it also does not change the RGB values, nor the sample colour box.
This is because the basic colour selected on the left is black, that has no Luminosity nor RGB components (other than zero, obviously).
It has zero values; that’s what the user wants to change. I guess I
don’t see a rationale for the spectrum being usable at any time except
if the current value happens to be black or white.
If you select another colour, the luminosity and RGB values change accordingly. You can try to call your colourdialog in this way:
colourdata = wx.ColourData()
colourdata.SetColour(wx.RED)
dlg = wx.ColourDialog(self, colourdata)
dlg.GetColourData().SetChooseFull(True)
No, I’m afraid that doesn’t help, but thanks.
The current value before calling the dialog is black, so I need that to
be the initial (default) value within the dialog; and it seems wrong
that the behaviour should be different based only on whether the
current value is or is not one of the special cases of (0,0,0) or
(255,255,255)
When I open a colour dialog, there is a large "spectrum" box which allows me to select a colour (in addition to the basic colour boxes, and the custom colour boxes). Clicking (initially) in the large spectrum box changes the Hue and Saturation, but not the Luminosity, and it also does not change the RGB values, nor the sample colour box.
This is because the basic colour selected on the left is black, that has no Luminosity nor RGB components (other than zero, obviously).
It has zero values; that's what the user wants to change. I guess I don't see a rationale for the spectrum being usable at any time except if the current value happens to be black or white.
The luminosity is controlled by the vertical slider on the far right of the dialog, and that controls the allowed range of RGB values. If you are in a room with zero luminosity then your eye can see nothing but black. The Windows color chooser mimics that behavior. Try clicking on the ? in the caption bar and then clicking on the color matrix and/or the luminosity slider for some more details.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!