Skip to content

Qt properties editor discards color alpha #6196

Closed

Description

@anntzer

plot([0, 1], [0, 1], color=(0, 0, 0, .5)) (a gray line) then click on the qt editor. Upon clicking on OK, the line becomes black, likely because the alpha value has been discarded.
Tested on 1.5.1 and master.

Activity

  1. added this to the milestone on Mar 21, 2016
  2. added
    Difficulty: Easyhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issues
    on Mar 21, 2016
  3. TuanNguyen27 commented on Mar 23, 2016

    @TuanNguyen27

    I would like to work on this issue, how do i start ?

  4. tacaswell commented on Mar 23, 2016

    @tacaswell
    Member

    @TuanNguyen27 You just did 😉

  5. TuanNguyen27 commented on Mar 23, 2016

    @TuanNguyen27

    @tacaswell thanks for the reply! my apologies for the vague question, I'm new, as you can tell, so I'm wondering where should I look in the code base to get started?

  6. tacaswell commented on Mar 23, 2016

    @tacaswell
    Member

    The color handling in https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/backends/qt_editor/figureoptions.py

    I may be reconsidering tagging this as easy, there maybe a non-trivial amount of Qt work involved.

  7. anntzer commented on May 5, 2016

    @anntzer
    ContributorAuthor

    Actually, the Qt side of things is relatively easy, because QColorDialog (Qt 4.8 and 5.6) provide the ShowAlphaChannel option (http://doc.qt.io/qt-5.6/qcolordialog.html#ColorDialogOption-enum). The more tricky part is that functions in matplotlib.colors in charge of the #rrggbb to color conversion (in both directions: rgb2hex, ColorConverter.to_rgba, is_color_like) do not handle the #rrggbbaa format, so quite a bit of work would be needed on that side.

  8. WeatherGod commented on May 5, 2016

    @WeatherGod
    Member

    IIRC, there is actually an open feature request to support #rrggbbaa
    format. So, getting that to work would actually close two issues at once.

    On Wed, May 4, 2016 at 10:11 PM, Antony Lee [email protected]
    wrote:

    Actually, the Qt side of things is relatively easy, because QColorDialog
    (Qt 4.8 and 5.6) provide the ShowAlphaChannel option (
    http://doc.qt.io/qt-5.6/qcolordialog.html#ColorDialogOption-enum). The
    more tricky part is that functions in matplotlib.colors in charge of the
    #rrggbb to color conversion (in both directions: rgb2hex,
    ColorConverter.to_rgba, is_color_like) do not handle the #rrggbbaa
    format, so quite a bit of work would be needed on that side.

    —
    You are receiving this because you are subscribed to this thread.
    Reply to this email directly or view it on GitHub
    #6196 (comment)

  9. modified the milestones: , on Jul 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Difficulty: Easyhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuesGUI: QtNew feature

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions