#RRGGBBAA

Hello

could the constructor of wx.Colour accept also the Alpha bits?

Peter

···


There is NO FATE, we are the creators.
blog: http://damoc.ro/

Yes, default value wx.ALPHA_OPAQUE.

···

2009/3/4 Peter Damoc pdamoc@gmail.com

Hello

could the constructor of wx.Colour accept also the Alpha bits?

Peter


There is NO FATE, we are the creators.
blog: http://damoc.ro/


wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

Ooops… my bad… is not wx.Color but wx.NamedColor

I meant… could the methods accepting a color in '#RRGGBB" format accept also alpha elements “#RRGGBBAA

:slight_smile:

···

On Wed, Mar 4, 2009 at 6:44 PM, raffaello barbarossa.platz@gmail.com wrote:

Yes, default value wx.ALPHA_OPAQUE.

2009/3/4 Peter Damoc pdamoc@gmail.com

Hello

could the constructor of wx.Colour accept also the Alpha bits?

Peter


There is NO FATE, we are the creators.
blog: http://damoc.ro/


wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users


wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users


There is NO FATE, we are the creators.
blog: http://damoc.ro/

AFAIK, no. A work around could be :

colour = wx.NamedColour(‘black’)
newcolour = wx.Colour(colour[0], colour[1], colour[2], myAlphaValue)

···

2009/3/4 Peter Damoc pdamoc@gmail.com

Ooops… my bad… is not wx.Color but wx.NamedColor

I meant… could the methods accepting a color in '#RRGGBB" format accept also alpha elements “#RRGGBBAA

:slight_smile:

  • Mostra testo citato -

On Wed, Mar 4, 2009 at 6:44 PM, raffaello barbarossa.platz@gmail.com wrote:

Yes, default value wx.ALPHA_OPAQUE.

2009/3/4 Peter Damoc pdamoc@gmail.com

Hello

could the constructor of wx.Colour accept also the Alpha bits?

Peter


There is NO FATE, we are the creators.
blog: http://damoc.ro/


wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users


wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users


There is NO FATE, we are the creators.
blog: http://damoc.ro/


wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

Raffaelo,

Thank you very much for trying to help me and please excuse my poor
way of expressing my problem.

I don't think there is a work around my problem... is just something
that has to be implemented at low level in the code that handles the
colors.

To give you a better idea:
If I want a red Brush I can write:
gcdc.SetBrush(wx.Brush("#FF0000"))
If I want a light red semitransparent wx.Brush HAVE TO write:
gcdc.SetBrush(wx.Brush(wx.Color(255,0,0,32))

My humble request is that I'm permited to write:
gcdc.SetBrush(wx.Brush("#FF000020"))

I think the fact that I can write this right now and, instead of
getting some kind of an assertion exception. I get a wx.Color(0,0,0,0)
is a bug. :slight_smile:

Also, if Robin touches that code and we also get support for something
like HSL/HSV (with an extra for apha, of course)... that would be soo
great...

Peter

···

On Wed, Mar 4, 2009 at 7:22 PM, raffaello <barbarossa.platz@gmail.com> wrote:

AFAIK, no. A work around could be :

colour = wx.NamedColour('black')
newcolour = wx.Colour(colour[0], colour[1], colour[2], myAlphaValue)

2009/3/4 Peter Damoc <pdamoc@gmail.com>

Ooops... my bad... is not wx.Color but wx.NamedColor

I meant... could the methods accepting a color in '#RRGGBB" format accept
also alpha elements "#RRGGBBAA"

:slight_smile:
- Mostra testo citato -

On Wed, Mar 4, 2009 at 6:44 PM, raffaello <barbarossa.platz@gmail.com> >> wrote:

Yes, default value wx.ALPHA_OPAQUE.

2009/3/4 Peter Damoc <pdamoc@gmail.com>

Hello

could the constructor of wx.Colour accept also the Alpha bits?

Peter

--
There is NO FATE, we are the creators.
blog: http://damoc.ro/

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

--
There is NO FATE, we are the creators.
blog: http://damoc.ro/

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

--
There is NO FATE, we are the creators.
blog: http://damoc.ro/

Peter Damoc wrote:

Hello

could the [string] constructor of wx.Colour accept also the Alpha bits?

Yes, this is something I've wished for myself recently, so I'll see if I can fit it in. Both "#RRGGBBAA" and also optional alpha with the color names, like "blue:7F".

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Robin,

Yes, this is something I've wished for myself recently, so I'll see if I can fit it in. Both "#RRGGBBAA" and also optional alpha with the color

names, like "blue:7F".

I think the open source Dabo project (dabodev.com) may have a library
that supports color names. May be a good place to start.

Regards,
Malcolm

Yes, they do. You can use any of the standard HTML color names, or RGB
tuples, or hex value, and Dabo handles it correctly. One of the many
elegant touches that make Dabo such a pleasure to work with.

···

On Thu, Mar 5, 2009 at 5:04 PM, <python@bdurham.com> wrote:

Robin,

Yes, this is something I've wished for myself recently, so I'll see if I can fit it in. Both "#RRGGBBAA" and also optional alpha with the color

names, like "blue:7F".

I think the open source Dabo project (dabodev.com) may have a library
that supports color names. May be a good place to start.

--

# p.d.

python@bdurham.com wrote:

Robin,

Yes, this is something I've wished for myself recently, so I'll see if I can fit it in. Both "#RRGGBBAA" and also optional alpha with the color

names, like "blue:7F".

I think the open source Dabo project (dabodev.com) may have a library
that supports color names. May be a good place to start.

wxPython also supports color names, and the full set of X11 colors can be loaded into the color database using the wx.lib.colourdb module. My comment was about adding the ability to also parse an alpha value from the string.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!