Skip to main content

tkcolorpicker

Latest Release Travis CI Build Status Appveyor Build Status Code coverage Platform Platform Platform 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

Installation

  • Ubuntu: use the PPA ppa:j-4321-i/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

  • 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:

  • parent: parent window

  • title: dialog title

  • alpha: alpha channel suppport

Example

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 files for tkcolorpicker 2.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tkcolorpicker 2.1.3
File Size Uploaded
tkcolorpicker-2.1.3.tar.gz 25.9 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for tkcolorpicker 2.1.3
File
tkcolorpicker-2.1.3-py3.7.egg Legacy Egg format - - Details
tkcolorpicker-2.1.3-py3-none-any.whl Python 3 none any Details
tkcolorpicker-2.1.3-py2.7.egg Legacy Egg format - - Details
tkcolorpicker-2.1.3-py2-none-any.whl Python 2 none any Details

Total release size: 175.0 kB

Release files / tkcolorpicker-2.1.3.tar.gz

Download URL tkcolorpicker-2.1.3.tar.gz
Size 25.9 kB
Tags Source
SHA-256 checksum
How to use checksums
2933f9781ced0a2b4d31f462dfd6883292a2a72c4dcb4f460026455a7644de99
BLAKE2b-256 checksum
How to use checksums
1523640324144846f388772833280ed72a53f24b52333f4d6b36c23ff9f21de6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.3

Release files / tkcolorpicker-2.1.3-py3.7.egg

Download URL tkcolorpicker-2.1.3-py3.7.egg
Size 43.2 kB
Tags Egg
SHA-256 checksum
How to use checksums
262b4f19309d3c0e0b2601ebbbc6b0ca25b09c6e21d99b451026bee77a0999d0
BLAKE2b-256 checksum
How to use checksums
524444e632303b270a7bcb5fef67389512fe0f49b2f0341cecd06334365b5fb8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.3

Release files / tkcolorpicker-2.1.3-py3-none-any.whl

Download URL tkcolorpicker-2.1.3-py3-none-any.whl
Size 31.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c82ce74a4f455d765c89d5669c7c707dfe88ad3c82a9020ca24f7cdfb71a02e7
BLAKE2b-256 checksum
How to use checksums
a735ac98622b49e7e842f7c06e3de65f13f8a3aeeaefb410b4f44b4c093167c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.3

Release files / tkcolorpicker-2.1.3-py2.7.egg

Download URL tkcolorpicker-2.1.3-py2.7.egg
Size 43.0 kB
Tags Egg
SHA-256 checksum
How to use checksums
0cf3dafb2461d6fae6a2ffa85f0d4938222cc42334118b2eb6c66817023fd48b
BLAKE2b-256 checksum
How to use checksums
dfd771abd82a242442a9f7440cfcc70bfcd1a85b86ce827b19b6ea993b911288
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.3

Release files / tkcolorpicker-2.1.3-py2-none-any.whl

Download URL tkcolorpicker-2.1.3-py2-none-any.whl
Size 31.4 kB
Tags Python 2
SHA-256 checksum
How to use checksums
78fadce62684940db32bf0a2ec15e3fe9eec2ea0f0821bca63ab6fd125808943
BLAKE2b-256 checksum
How to use checksums
2755437898c599f77ac7e8c442a2fdbc69a39d4e2ae11a04ab493e3bc1e19383
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.3

Release history Release notifications | RSS feed

This release

2.1.3 This release

5 release files

2.1.2

5 release files

2.1.1

5 release files

2.1.0

5 release files

2.0.0

3 release files

1.0.1

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page