Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qt properties editor discards color alpha #6196

Closed
anntzer opened this issue Mar 21, 2016 · 6 comments · Fixed by #6383
Closed

Qt properties editor discards color alpha #6196

anntzer opened this issue Mar 21, 2016 · 6 comments · Fixed by #6383
Labels
Difficulty: Easy https://matplotlib.org/devdocs/devel/contribute.html#good-first-issues GUI: Qt New feature
Milestone

Comments

@anntzer
Copy link
Contributor

anntzer commented Mar 21, 2016

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.

@tacaswell tacaswell added this to the 2.1 (next point release) milestone Mar 21, 2016
@tacaswell tacaswell added the Difficulty: Easy https://matplotlib.org/devdocs/devel/contribute.html#good-first-issues label Mar 21, 2016
@TuanNguyen27
Copy link

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

@tacaswell
Copy link
Member

@TuanNguyen27 You just did 😉

@TuanNguyen27
Copy link

@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?

@tacaswell
Copy link
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.

@anntzer
Copy link
Contributor Author

anntzer commented May 5, 2016

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.

@WeatherGod
Copy link
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 notifications@github.com
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)

@QuLogic QuLogic modified the milestones: 2.0 (style change major release), 2.1 (next point release) Jul 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty: Easy https://matplotlib.org/devdocs/devel/contribute.html#good-first-issues GUI: Qt New feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants