This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Color DnD to Krita

Tags: None
(comma "," separated)
finticemo
Registered Member
Posts
24
Karma
0

Color DnD to Krita

Tue Apr 09, 2013 7:01 am
I want to drop colors that I have mixed in GPick onto Krita (into the [color] palette, or to set the FGcolor directly).

This seems like quite basic functionality, but nowhere I drop these colors accepts them*. Since Krita doesn't seem to be able to eyedrop colors from other windows, this is a definite problem. Is there something I'm missing here that will allow me to efficiently bring in colors from external applications?

* Except the 'add color to palette' dialog. To add colors by that method, I must click the 'Add' button, drag a single color, hit Enter to confirm, click the 'Add' button, drag a single color, [etc].. until I've transferred all the colors. This is tedious.
User avatar
halla
KDE Developer
Posts
5092
Karma
20
OS

Re: Color DnD to Krita

Tue Apr 09, 2013 7:15 am
In git master, you can click on the dual color button in the top toolbar to get the default KDE color selector which includes a color picker that works outside Krita. That dialog doesn't seem to support dragging from gpick -- I don't know which protocol gpick speaks, I hadn't used it before.

Please keep in mind that when you pick colors from an app running in another window, that you will get a plain 8 bit RGB triplet, which you will then use in Krita as if it were a color managed color. That means that the working space profile and the display profile will apply their lut to the color you have picked, and the result might be surprising in some cases.
finticemo
Registered Member
Posts
24
Karma
0

Re: Color DnD to Krita

Tue Apr 09, 2013 7:19 am
GPick uses the standard #RRGGBB format (same one as GIMP, Inkscape, etc), in which sRGB colorspace is normally assumed.
In the case of the KDE colorselector, isn't it the case that the color it returns will always be an sRGB one that has to be converted to working space? If this is the case, the usual application of this seems like it should behave in an unsurprising way.
User avatar
halla
KDE Developer
Posts
5092
Karma
20
OS

Re: Color DnD to Krita

Tue Apr 09, 2013 7:23 am
Yes -- the default KDE color selector always uses an unmanaged rgb triplet, which is exactly the reason I hesitated for so long before giving access to it.
User avatar
halla
KDE Developer
Posts
5092
Karma
20
OS

Re: Color DnD to Krita

Tue Apr 09, 2013 7:26 am
Okay, I was wrong. You can just drag a color from gpick and drop it on the advanced color selector, and that color gets selected.
finticemo
Registered Member
Posts
24
Karma
0

Re: Color DnD to Krita

Tue Apr 09, 2013 7:36 am
That sounds encouraging, thanks for the info :) To clarify, before I start compiling the git version of Krita -- This behaviour where the 'advanced color selector' simply accepts these drops is only in git, not in 2.6.2?
User avatar
halla
KDE Developer
Posts
5092
Karma
20
OS

Re: Color DnD to Krita

Tue Apr 09, 2013 7:43 am
No, that actually should be in 2.4 even -- it was coded, it turns out in 2010:

e378bcca (Adam Celarek 2010-08-11 01:05:25 +0000 356)void KisColorSelectorBase::dropEvent(QDropEvent *e)
e378bcca (Adam Celarek 2010-08-11 01:05:25 +0000 357){
e378bcca (Adam Celarek 2010-08-11 01:05:25 +0000 358) QColor color;
e378bcca (Adam Celarek 2010-08-11 01:05:25 +0000 359) if(e->mimeData()->hasColor()) {
e378bcca (Adam Celarek 2010-08-11 01:05:25 +0000 360) color = qvariant_cast<QColor>(e->mimeData()->colorData());
e378bcca (Adam Celarek 2010-08-11 01:05:25 +0000 361) }
e378bcca (Adam Celarek 2010-08-11 01:05:25 +0000 362) else if(e->mimeData()->hasText()) {
e378bcca (Adam Celarek 2010-08-11 01:05:25 +0000 363) color.setNamedColor(e->mimeData()->text());
e378bcca (Adam Celarek 2010-08-11 01:05:25 +0000 364) if(!color.isValid())
e378bcca (Adam Celarek 2010-08-11 01:05:25 +0000 365) return;
e378bcca (Adam Celarek 2010-08-11 01:05:25 +0000 366) }
e378bcca (Adam Celarek 2010-08-11 01:05:25 +0000 367)
e378bcca (Adam Celarek 2010-08-11 01:05:25 +0000 368) KoColor kocolor(color , KoColorSpaceRegistry::instance()->rgb8());
e378bcca (Adam Celarek 2010-08-11 01:05:25 +0000 369) color = findGeneratingColor(kocolor);
e378bcca (Adam Celarek 2010-08-11 01:05:25 +0000 370) setColor(color);
534248a8 (Adam Celarek 2010-08-31 22:31:35 +0000 371) commitColor(kocolor, Foreground);
e378bcca (Adam Celarek 2010-08-11 01:05:25 +0000 372)}
finticemo
Registered Member
Posts
24
Karma
0

Re: Color DnD to Krita

Tue Apr 09, 2013 7:50 am
Ah I see, thanks a lot! :)
User avatar
TheraHedwig
KDE Developer
Posts
1794
Karma
10
OS

Re: Color DnD to Krita

Sat Apr 13, 2013 9:53 am
I can confirm this, I use it all the time :D
cartorp
Registered Member
Posts
5
Karma
0

Re: Color DnD to Krita

Wed Nov 19, 2014 11:37 am
I dragged colors from gPick into Krita's Artistic Color Selector and Advanced Color Selector. Didn't seem to work. I am using Krita 2.8.3

Could someone explain how can I explain I use the gPick with Krita?
User avatar
halla
KDE Developer
Posts
5092
Karma
20
OS

Re: Color DnD to Krita

Wed Nov 19, 2014 11:46 am
Well... I don't know about the artistic color selector, but I just tried with the advanced color selector, and I just dragged the color onto the color selector, and it selected the right color.


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], q.ignora, watchstar