tkcolorpicker


Nametkcolorpicker JSON
Version 2.1.3 PyPI version JSON
download
home_pagehttps://github.com/j4321/tkColorPicker
SummaryColor picker dialog for Tkinter
upload_time2019-05-28 12:50:53
maintainer
docs_urlNone
authorJuliette Monsel
requires_python
licenseGPLv3
keywords tkinter color colorchooser
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            tkcolorpicker
=============

|Release| |Travis| |Appveyor| |Codecov| |Windows| |Linux| |Mac| |License|

Color picker dialog for Tkinter.

This module contains a ``ColorPicker`` class which implements the color picker
and an ``askcolor`` function that displays the color picker and
returns the chosen color in RGB and HTML formats.


Requirements
------------

- Linux, Windows, Mac
- Python 2.7 or 3.x

And the python packages:

- tkinter (included in the python distribution for Windows)
- `Pillow <https://pypi.org/project/Pillow/>`_


Installation
------------

- Ubuntu: use the PPA `ppa:j-4321-i/ppa <https://launchpad.net/~j-4321-i/+archive/ubuntu/ppa>`__

    ::

        $ sudo add-apt-repository ppa:j-4321-i/ppa
        $ sudo apt-get update
        $ sudo apt-get install python(3)-tkcolorpicker


- Archlinux: 

    the package is available on `AUR <https://aur.archlinux.org/packages/python-tkcolorpicker>`__


- With pip:

    ::

        $ pip install tkcolorpicker


Documentation
-------------

Syntax:

::

    askcolor(color="red", parent=None, title=_("Color Chooser"), alpha=False)

Open a ColorPicker dialog and return the chosen color.

The selected color is returned as a tuple (RGB(A), #RRGGBB(AA))
(None, None) is returned if the color selection is cancelled.

Arguments:

    + color: initially selected color, supported formats:

        - RGB(A)
        - #RRGGBB(AA) 
        - tkinter color name (see http://wiki.tcl.tk/37701 for a list)

    + parent: parent window
    + title: dialog title
    + alpha: alpha channel suppport


Example
-------

.. code:: python

    import tkinter as tk
    import tkinter.ttk as ttk
    from tkcolorpicker import askcolor

    root = tk.Tk()
    style = ttk.Style(root)
    style.theme_use('clam')

    print(askcolor((255, 255, 0), root))
    root.mainloop()


.. |Release| image:: https://badge.fury.io/py/tkcolorpicker.svg
    :alt: Latest Release
    :target:  https://pypi.org/project/tkcolorpicker/
.. |Linux| image:: https://img.shields.io/badge/platform-Linux-blue.svg
    :alt: Platform
.. |Windows| image:: https://img.shields.io/badge/platform-Windows-blue.svg
    :alt: Platform
.. |Mac| image:: https://img.shields.io/badge/platform-Mac-blue.svg
    :alt: Platform
.. |Travis| image:: https://travis-ci.org/j4321/tkColorPicker.svg?branch=master
    :target: https://travis-ci.org/j4321/tkColorPicker
    :alt: Travis CI Build Status
.. |Appveyor| image:: https://ci.appveyor.com/api/projects/status/7ow8wfw5by7uiise/branch/master?svg=true
    :target: https://ci.appveyor.com/project/j4321/tkcolorpicker/branch/master
    :alt: Appveyor Build Status
.. |Codecov| image:: https://codecov.io/gh/j4321/tkColorPicker/branch/master/graph/badge.svg
    :target: https://codecov.io/gh/j4321/tkColorPicker
    :alt: Code coverage
.. |License| image:: https://img.shields.io/github/license/j4321/tkColorPicker.svg
    :target: https://www.gnu.org/licenses/gpl-3.0.en.html
    :alt: License



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/j4321/tkColorPicker",
    "name": "tkcolorpicker",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "tkinter,color,colorchooser",
    "author": "Juliette Monsel",
    "author_email": "j_4321@protonmail.com",
    "download_url": "https://files.pythonhosted.org/packages/15/23/640324144846f388772833280ed72a53f24b52333f4d6b36c23ff9f21de6/tkcolorpicker-2.1.3.tar.gz",
    "platform": "",
    "description": "tkcolorpicker\n=============\n\n|Release| |Travis| |Appveyor| |Codecov| |Windows| |Linux| |Mac| |License|\n\nColor picker dialog for Tkinter.\n\nThis module contains a ``ColorPicker`` class which implements the color picker\nand an ``askcolor`` function that displays the color picker and\nreturns the chosen color in RGB and HTML formats.\n\n\nRequirements\n------------\n\n- Linux, Windows, Mac\n- Python 2.7 or 3.x\n\nAnd the python packages:\n\n- tkinter (included in the python distribution for Windows)\n- `Pillow <https://pypi.org/project/Pillow/>`_\n\n\nInstallation\n------------\n\n- Ubuntu: use the PPA `ppa:j-4321-i/ppa <https://launchpad.net/~j-4321-i/+archive/ubuntu/ppa>`__\n\n    ::\n\n        $ sudo add-apt-repository ppa:j-4321-i/ppa\n        $ sudo apt-get update\n        $ sudo apt-get install python(3)-tkcolorpicker\n\n\n- Archlinux: \n\n    the package is available on `AUR <https://aur.archlinux.org/packages/python-tkcolorpicker>`__\n\n\n- With pip:\n\n    ::\n\n        $ pip install tkcolorpicker\n\n\nDocumentation\n-------------\n\nSyntax:\n\n::\n\n    askcolor(color=\"red\", parent=None, title=_(\"Color Chooser\"), alpha=False)\n\nOpen a ColorPicker dialog and return the chosen color.\n\nThe selected color is returned as a tuple (RGB(A), #RRGGBB(AA))\n(None, None) is returned if the color selection is cancelled.\n\nArguments:\n\n    + color: initially selected color, supported formats:\n\n        - RGB(A)\n        - #RRGGBB(AA) \n        - tkinter color name (see http://wiki.tcl.tk/37701 for a list)\n\n    + parent: parent window\n    + title: dialog title\n    + alpha: alpha channel suppport\n\n\nExample\n-------\n\n.. code:: python\n\n    import tkinter as tk\n    import tkinter.ttk as ttk\n    from tkcolorpicker import askcolor\n\n    root = tk.Tk()\n    style = ttk.Style(root)\n    style.theme_use('clam')\n\n    print(askcolor((255, 255, 0), root))\n    root.mainloop()\n\n\n.. |Release| image:: https://badge.fury.io/py/tkcolorpicker.svg\n    :alt: Latest Release\n    :target:  https://pypi.org/project/tkcolorpicker/\n.. |Linux| image:: https://img.shields.io/badge/platform-Linux-blue.svg\n    :alt: Platform\n.. |Windows| image:: https://img.shields.io/badge/platform-Windows-blue.svg\n    :alt: Platform\n.. |Mac| image:: https://img.shields.io/badge/platform-Mac-blue.svg\n    :alt: Platform\n.. |Travis| image:: https://travis-ci.org/j4321/tkColorPicker.svg?branch=master\n    :target: https://travis-ci.org/j4321/tkColorPicker\n    :alt: Travis CI Build Status\n.. |Appveyor| image:: https://ci.appveyor.com/api/projects/status/7ow8wfw5by7uiise/branch/master?svg=true\n    :target: https://ci.appveyor.com/project/j4321/tkcolorpicker/branch/master\n    :alt: Appveyor Build Status\n.. |Codecov| image:: https://codecov.io/gh/j4321/tkColorPicker/branch/master/graph/badge.svg\n    :target: https://codecov.io/gh/j4321/tkColorPicker\n    :alt: Code coverage\n.. |License| image:: https://img.shields.io/github/license/j4321/tkColorPicker.svg\n    :target: https://www.gnu.org/licenses/gpl-3.0.en.html\n    :alt: License\n\n\n",
    "bugtrack_url": null,
    "license": "GPLv3",
    "summary": "Color picker dialog for Tkinter",
    "version": "2.1.3",
    "split_keywords": [
        "tkinter",
        "color",
        "colorchooser"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "ba1b5e6f38382086a0e06a80be0889d4",
                "sha256": "0cf3dafb2461d6fae6a2ffa85f0d4938222cc42334118b2eb6c66817023fd48b"
            },
            "downloads": -1,
            "filename": "tkcolorpicker-2.1.3-py2.7.egg",
            "has_sig": false,
            "md5_digest": "ba1b5e6f38382086a0e06a80be0889d4",
            "packagetype": "bdist_egg",
            "python_version": "2.7",
            "requires_python": null,
            "size": 43012,
            "upload_time": "2019-05-28T12:50:49",
            "upload_time_iso_8601": "2019-05-28T12:50:49.383636Z",
            "url": "https://files.pythonhosted.org/packages/df/d7/71abd82a242442a9f7440cfcc70bfcd1a85b86ce827b19b6ea993b911288/tkcolorpicker-2.1.3-py2.7.egg",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "fbf27ceacf7056cf74914a9293f0a9b9",
                "sha256": "78fadce62684940db32bf0a2ec15e3fe9eec2ea0f0821bca63ab6fd125808943"
            },
            "downloads": -1,
            "filename": "tkcolorpicker-2.1.3-py2-none-any.whl",
            "has_sig": false,
            "md5_digest": "fbf27ceacf7056cf74914a9293f0a9b9",
            "packagetype": "bdist_wheel",
            "python_version": "py2",
            "requires_python": null,
            "size": 31436,
            "upload_time": "2019-05-28T12:50:45",
            "upload_time_iso_8601": "2019-05-28T12:50:45.440290Z",
            "url": "https://files.pythonhosted.org/packages/27/55/437898c599f77ac7e8c442a2fdbc69a39d4e2ae11a04ab493e3bc1e19383/tkcolorpicker-2.1.3-py2-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "20d1c35f7047c72f6b2fc690b1ccd0b0",
                "sha256": "262b4f19309d3c0e0b2601ebbbc6b0ca25b09c6e21d99b451026bee77a0999d0"
            },
            "downloads": -1,
            "filename": "tkcolorpicker-2.1.3-py3.7.egg",
            "has_sig": false,
            "md5_digest": "20d1c35f7047c72f6b2fc690b1ccd0b0",
            "packagetype": "bdist_egg",
            "python_version": "3.7",
            "requires_python": null,
            "size": 43201,
            "upload_time": "2019-05-28T12:50:51",
            "upload_time_iso_8601": "2019-05-28T12:50:51.419190Z",
            "url": "https://files.pythonhosted.org/packages/52/44/44e632303b270a7bcb5fef67389512fe0f49b2f0341cecd06334365b5fb8/tkcolorpicker-2.1.3-py3.7.egg",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "8736e4de847a31998a6a48f8619dec12",
                "sha256": "c82ce74a4f455d765c89d5669c7c707dfe88ad3c82a9020ca24f7cdfb71a02e7"
            },
            "downloads": -1,
            "filename": "tkcolorpicker-2.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8736e4de847a31998a6a48f8619dec12",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 31436,
            "upload_time": "2019-05-28T12:50:47",
            "upload_time_iso_8601": "2019-05-28T12:50:47.339833Z",
            "url": "https://files.pythonhosted.org/packages/a7/35/ac98622b49e7e842f7c06e3de65f13f8a3aeeaefb410b4f44b4c093167c9/tkcolorpicker-2.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "5b04fe80007b9a2e69bd8b07f2bf532d",
                "sha256": "2933f9781ced0a2b4d31f462dfd6883292a2a72c4dcb4f460026455a7644de99"
            },
            "downloads": -1,
            "filename": "tkcolorpicker-2.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "5b04fe80007b9a2e69bd8b07f2bf532d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 25908,
            "upload_time": "2019-05-28T12:50:53",
            "upload_time_iso_8601": "2019-05-28T12:50:53.165183Z",
            "url": "https://files.pythonhosted.org/packages/15/23/640324144846f388772833280ed72a53f24b52333f4d6b36c23ff9f21de6/tkcolorpicker-2.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2019-05-28 12:50:53",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "j4321",
    "github_project": "tkColorPicker",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "appveyor": true,
    "lcname": "tkcolorpicker"
}
        
Elapsed time: 0.07857s