corrections and improvements to PyColourChooser (wxcolourchooser)

Dear Michael,

I had a look at your code and have made some improvements and fixes.
I've attached a patch for all of this. Please try it out!

* You created your palette by reverse-engineering that of MS and fudging
it with RGB. This is of course much more straight-forward with a
hue-saturation matrix and is actually the way in wich it should be
done. Fixed.

* Bug with writing of palette image. Fixed.

* Colour-slider is now a Value control (thus completing the HSV
triplet).

* Added HSV text entries to the control. This is of course a far more
natural way of working with colour than the kludge that is RGB. :slight_smile:

* Embedded palette image changed to embedded compressed PNG (with
img2py).

Best regards,
Charl

wxcolourchooser.hsv-improvements.diff (95.5 KB)

···

--
charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/

Hi Charl. Thanks for the good work! I'm not a big graphics arts
guy, so I'm glad you steped in and corrected me. I've incorporated
your patch, along with some slight modification: I've changed the
layout of the HSV and RGB static text and boxes so that they're in a
horizontal grid (while shortening the names). This keeps the control
from expanding too much horizontally - I know use a width of 200,
instead of 240. You have to admit though - the MS fudging was pretty
funny.

  The changes are in the projects CVS:
wxPyColourChooser download | SourceForge.net, and have been
formatted the way Robin likes it. They should get incoporated in the
next major release of the widget - which will then be put into
wxPython.

              Regards,

                  -- Mike

···

On Fri, Mar 07 @ 13:40, Charl P. Botha wrote:

Dear Michael,

I had a look at your code and have made some improvements and fixes.
I've attached a patch for all of this. Please try it out!

* You created your palette by reverse-engineering that of MS and fudging
it with RGB. This is of course much more straight-forward with a
hue-saturation matrix and is actually the way in wich it should be
done. Fixed.

* Bug with writing of palette image. Fixed.

* Colour-slider is now a Value control (thus completing the HSV
triplet).

* Added HSV text entries to the control. This is of course a far more
natural way of working with colour than the kludge that is RGB. :slight_smile:

* Embedded palette image changed to embedded compressed PNG (with
img2py).

Best regards,
Charl

--
charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/

--
Michael Gilfix
mgilfix@eecs.tufts.edu

For my gpg public key:
http://www.eecs.tufts.edu/~mgilfix/contact.html

  Hi Charl. Thanks for the good work! I'm not a big graphics arts
guy, so I'm glad you steped in and corrected me. I've incorporated
your patch, along with some slight modification: I've changed the

Great stuff! Thanks.

instead of 240. You have to admit though - the MS fudging was pretty
funny.

Well, I thought to myself that if we were to compare what you did to the
existing RGB<->HSV conversion math, we would see quite a few very
interesting coincidences. :slight_smile:

Thanks again,
Charl

···

On Fri, Mar 07, 2003 at 09:37:44PM -0500, Michael Gilfix wrote:

--
charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/