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

[WIPz] Color Pickin` Pro

Tags: None
(comma "," separated)
User avatar
Metallicow
Registered Member
Posts
53
Karma
0
OS

[WIPz] Color Pickin` Pro

Sat Nov 17, 2018 8:01 am
Color Pickin` Pro

Pick a color. Any color...


Screenshots:


Description:
Popup designed color picker. Works standalone or anywhere. Totally custom. It is yours and yours alone to smear or whatever.
It's just Magick! ...ermmm or just a lot of color theory and stuff... most of us don't understand. Anywho EZ(easy) to use!
Single key press pop up functionality and ability to work externally from targeted programs.
Functionality *Restrictions* may or may not apply depending on use in certain platforms/softwares/languages.
Written in python and uses various libraries, depending on what you want to do with it.

Origin:
- Long time ago in a far far far away galaxy... ...More accurately the beginning of time.... think maybe of a Apple II (The CRT monitor case looked like an transparent green apple lol) (...btw my first public remembered recollection of a color on a screen provided in a public school system. Oregon Trail in school. Number Munchers and other CAD stuff at home)
- Years inbetween: Check your local school/wherever art board. ...May be in Paint(real or microsoft), Krylon, on paper somewhere, or lost on a hard drive.
- Current design (originally(2009-2011)-present)
I need to pick a color in my mind and pick it quick. The design of the colorwheel should be intuitive(easy to understand and use). After years of playing around with textures, I finally decided on 512x512(Game sized) as a size as it could be used or scaled most anywhere. Jackson Gabbard happened to have a generator that fit most all colors into a wheel that just fit nicely and is the current circle design of my resolution and whatnot., tho it isn't perfect...

Krita:
This works right now in krita 4.2.x after an load of porting and other fixes. I still am not done.
What I do have done so far is a poppalette_demo so that users wanting a custom popup can make their own.

Release:
Official release date unknown.

Development:
Main Development happens in wxPython offline.
PySide/PyQt4/5 krita / external apps dev is not top priority.
A cross compatible everything lib/app is second priority if no major cross library problems are found.


Edit by moderator: The account of this user was hacked and disabled by us. Please report any other edited ones by this user we might have missed, we try to keep the meaningful posts

Last edited by Metallicow on Wed Nov 28, 2018 11:01 pm, edited 2 times in total.


User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS

Re: [WIPz] Color Pickin` Pro

Sat Nov 17, 2018 2:05 pm
What is the point here? What even is this, and how is it related to KDE software?


I'm working on the KDevelop IDE.
User avatar
halla
KDE Developer
Posts
5092
Karma
20
OS

Re: [WIPz] Color Pickin` Pro

Sat Nov 17, 2018 2:19 pm
scummos wrote:What is the point here? What even is this, and how is it related to KDE software?


Well, I _think_ it's meant as python plugin for Krita, that uses wxPython or something like that. But the initial post could be a bit more comprehensible in places.
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS

Re: [WIPz] Color Pickin` Pro

Sat Nov 17, 2018 4:25 pm
boudewijn wrote:
scummos wrote:What is the point here? What even is this, and how is it related to KDE software?


Well, I _think_ it's meant as python plugin for Krita, that uses wxPython or something like that. But the initial post could be a bit more comprehensible in places.

Seems like it, yes. But it neither asks for specific feedback, nor does it provide a source code link or anything.


I'm working on the KDevelop IDE.
User avatar
Metallicow
Registered Member
Posts
53
Karma
0
OS

Re: [WIPz] Color Pickin` Pro

Sat Nov 17, 2018 11:09 pm
Yes it is written in python and is plugged into krita. It uses different aspects of different windowing kits to achieve various effects and stuff you can do.


User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS

Re: [WIPz] Color Pickin` Pro

Sun Nov 18, 2018 1:39 pm
And how can people get it?


I'm working on the KDevelop IDE.
User avatar
Metallicow
Registered Member
Posts
53
Karma
0
OS

Re: [WIPz] Color Pickin` Pro

Sun Nov 18, 2018 10:16 pm
At the moment it isnt released anywhere as there is a bit more work that needs done. Tho I am working on making a demo popup plugin that can be included into krita so people can make a popup easily and shows the basics of how this would be done in qt python. Basically you can slap a texture onto a popup window, so it will be enough that most non coders will be able to just draw a layout/mask etc right in krita and that will be the texture for the popup. and maybe show how to put a button onto it and do something. Just some basic stuff.

@kritadevs I did run across this tho.

colorYellow = ManagedColor("RGBA", "U8", "")
QVector<float> yellowComponents = colorYellow.components()
yellowComponents[0] = 1.0
yellowComponents[1] = 1.0
yellowComponents[2] = 0
yellowComponents[3] = 1.0
colorYellow.setComponents(yellowComponents)
QColor yellow = colorYellow.colorForCanvas(canvas)

https://api.kde.org/extragear-api/graph ... Color.html

Ok. came across this and for a minute I thought it was a bug... This to me looks more like a typo since it isnt what I would call yellow.

Code: Select all
def test():
    instance = Krita.instance()
    views = instance.views()
    view0 = views[0]

    color = krita.ManagedColor("RGBA", "U8", "")
    colorComponents = color.components()
    colorComponents[0] = 1.0   # b
    colorComponents[1] = 1.0   # g
    colorComponents[2] = 0     # r
    colorComponents[3] = 1.0   #
    color.setComponents(colorComponents)

    view0.setForeGroundColor(color)

    colorComponents = color.components()
    colorComponents[0] = 1.0   # b
    colorComponents[1] = 1.0   # g
    colorComponents[2] = 0     # r
    colorComponents[3] = 0.5   #
    color.setComponents(colorComponents)

    view0.setBackGroundColor(color)


User avatar
Metallicow
Registered Member
Posts
53
Karma
0
OS

Re: [WIPz] Color Pickin` Pro

Wed Nov 28, 2018 11:29 pm
Ok. I secured a bamboo to work with so porting cookies should be covered. Its all i recall i ever asked for it anyhow. And they keep constantly bugging me about when im gonna get it done lol(when it gets done...). I managed to rip about everything out and got a popup palette demo going everyone can download.
https://github.com/Metallicow/Krita-kiosk

It probably still needs a bit of polish and I need to figure out how to hook into the app instance so if it is shown(popped up) upon close it closes cleanly also instead of staying open after krita exits.

When I can get the rest working in a simple fashion the stuff like MR4Y's requests and others can be done pretty simply without users bugging too much for help. They design it basically and do the legwork, and the idea is that they should be able to figure out the rest easily enough i'd hope.
viewtopic.php?f=288&t=141557


User avatar
halla
KDE Developer
Posts
5092
Karma
20
OS

Re: [WIPz] Color Pickin` Pro

Thu Nov 29, 2018 9:00 am
Could very well be a bug. You might be the first person to exercise these functions. Please report on bugs.kde.org.
User avatar
Metallicow
Registered Member
Posts
53
Karma
0
OS

Re: [WIPz] Color Pickin` Pro

Fri Dec 21, 2018 8:02 pm
@boud kritadevs
I'm not sure it is a bug really or if I should report a "bug" as of yet. I might call it a bit of an over/undersight or maybe I'm not looking in the right spot for a connect... You or someone else could probably give me a quick answer on the "not closing cleanly" issue and that may help me from having to write a 20 page wall of text trying to explain it in different ways, since the closeEvent really is an abstract kind of issue to deal with in any tool kit.

What needs to happen:
1. User starts krita. krita loads all the little pythons into the tiny house/school/library/print shop/art studio ect...
2. User(s) does whatever they would normally do using the program... .kra may be a shared/collaborated on a closed network etc...
3. User decides that it is time to go somewhere else and needs to close krita. This may be "The BIG RED Professor X/Magneto" close button(normally the main program takes care of the regular closing routine), could be the "Quit" menu item, or tiggered by keyboard shortcut(who knows... or santa's pet mouse ran across the keyboard)
4. At this point before krita asks the 'Yes/No/Cancel' modded questionnaire. The plugin(lil python) needs to be notified that it's 5 min til closing time. Pick up your crayons, supplies, save info(.txt/.ini)/data, or make any last modifications. Because when krita asks again at the door some stuff may go into the trash by accident(circular file).
5. krita greets all users at the door and asks the modded questionaire and says "You don't got to go home, but you cant stay here. We will reopen later/tomorrow at whatever time. Safe journeys." Any No answers; user tosses art/scratch paper into the shredder without second thoughts and file is closed.
6. User has a couple minutes to secure all last minute things into bookbag/portfolio. Normally this would be stuff like window location/size etc... zips up bag and coat and starts journey thru the snowy door toward next place on the map. At the moment, the demo file just writes out a test.txt file for verification it actually did something.

What is happening at the moment:
#4 is not being called. #6 is, but after #5 the data access is gone and is a dead object/runtime error.
When the program is run standalone, the closeEvent is firing off as it normally would.

Code: Select all
    def initialize(self):
        """"""
        # Since this is the extension class we will want to parent our child
        #  to the nun and sometimes trade it with the krita mainframe to maintain
        #  'Always on Top' style flag when toggling the GL art canvas.
        mainWindow = self.kritaInstance.activeWindow().qwindow()
        self.popupframe = popuppalette_demo.PopupPaletteFrame(None)
        self.popupframe.hide()

        # When the krita mainframe close button is pressed,
        #  the menu item "Quit" is triggered,
        #  or the keyboard shortcut associated with "Quit" is pressed,
        #  we will want to collect all our data before krita destroys itself(object).
        #  In the standalone application this normally would call the closeEvent.
        ##TODO: Need a way to save data before Yes/No/Cancel questionnaire as objects will be dead after the questionnaire.
        krita.qApp.aboutToQuit.connect(self.saveData)  # This saves data after krita asks Yes/No/Cancel Modification questions.

        self.kritaInstance.action('view_show_canvas_only').triggered.connect(self.onShowCanvasOnly)


Proposed Solution:
I would think it might be best to have a method in the Extension or Docker classes that would fire off if it exists when krita handles the closeEvent.
Could be something along these lines... idunno really as I haven't digged into the krita code to even know where it resides yet.

Code: Select all
    def preClose(self):  # , event ???
        """The krita program has been signaled to close"""
        # do stuff before krita asks modded questionaire.
        pass or return True


Also.
Ive gotten the canvas only mode switcheroo parent always fighting for top force feed thing sorta figured out *sigh once again* and is in working shape on windows. Small issue still remains when clicking on an AutoNotebook Docker Tab if not in canvas only mode and GL window fights for top again, so doing a keykey will fix it, but is a small inconvenience I'll have to try and catch the event or something. Of course the more possible parents it *could* have Ex(None, Krita, Itself, Blender, Inkscape, 3Dprinter, etc...) the more headache juggling the parents and passing infos back and forth becomes.

Anywho, Happy Holidays.




Bookmarks



Who is online

Registered users: abc72656, Bing [Bot], daret, Google [Bot], lockheed, Sogou [Bot], Yahoo [Bot]