KolorTool For KDE 4

July 17, 2009

Update (2009-07-25)
Turns out what I needed was KColorChooser in KDE4. Oh well :-)

Maybe I’m blind, but I can’t find a nice, simple color tool on KDE 4 for my life. The color picker Plasmoid is okay, but it doesn’t do what I want: to mangle colors and get the resulting hex values.

To fix this, I threw together this little Python bit and installed it as KolorTool. Does what I need, just throws up a color dialog for me to play with.

Pretty simple...

KolorTool

#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
from PyQt4 import QtGui
from PyKDE4 import kdeui

app = QtGui.QApplication(sys.argv)
picker = kdeui.KColorDialog();
picker.show();

sys.exit(app.exec_());

KolorTool.desktop

[Desktop Entry]
Comment[en_US]=
Comment=
Exec=~/System/bin/KolorTool
GenericName[en_US]=Color Picker Dialog
GenericName=Color Picker Dialog
Icon=kcolorchooser
MimeType=
Name[en_US]=KolorTool
Name=KolorTool
Path=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-KDE-SubstituteUID=false
X-KDE-Username=

Enjoy, modify and let me know if there is an existing, standard tool like this please!

Comments

  1. Marcond says:

    Excellent! This little code does exactly what I was looking for.

    Also, whoever installs it should not forget to change the .desktop to match the correct directory, on the entry: Exec=~/System/bin/KolorTool

    Thanks and a great 2014!
    Marcond

  2. Marcond says:

    And yes, I missed the KColorChooser on Muon.

    I was searching for KColorPicker instead, silly me :-)

    Thanks anyway!
    Marcond

  3. George says:

    … and not forget to mark KolorTool file as executable.

    Thank you for your great work!

Leave A Comment

Your email will not be published.