Skip to main content

Color picker dialog for Tkinter

Project description

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 with tkinter + ttk (default for Windows but not for Linux)

Installation

With pip:

$ pip install tkcolorpicker

Documentation

askcolor(color=”red”, parent=None, title=_(“Color Chooser”)):

Display the color picker dialog and return the selected color in rgb and html format. An empty tuple is returned if the color selection is cancelled.

  • color: initially selected color, the following formats are supported
  • parent: parent window

  • title: title of the color picker dialog

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()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tkcolorpicker-1.0.1.tar.gz (20.5 kB view details)

Uploaded Source

Built Distributions

tkcolorpicker-1.0.1-py3.6.egg (35.3 kB view details)

Uploaded Source

tkcolorpicker-1.0.1-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

Details for the file tkcolorpicker-1.0.1.tar.gz.

File metadata

File hashes

Hashes for tkcolorpicker-1.0.1.tar.gz
Algorithm Hash digest
SHA256 3a97a0d1921155b90e23a2a90c46c1e845dc9537beafb718eaf2d3435ba31801
MD5 253b346747c87d03d612cffb9e055891
BLAKE2b-256 59a8334f60717405b4b6e97aab1970dcb1c0142e956190fc0d5420ca27675777

See more details on using hashes here.

File details

Details for the file tkcolorpicker-1.0.1-py3.6.egg.

File metadata

File hashes

Hashes for tkcolorpicker-1.0.1-py3.6.egg
Algorithm Hash digest
SHA256 d0e5b45f04f2e967e4fd2b21a9fc7b32eceebcaab9aca708f850379436d7c5f6
MD5 4656b469bdb02b0e79f2fe3d85422627
BLAKE2b-256 d4d753a0950add24a7b9c747185ffb8006ff99ebcc38f2dfd0524eedbc09ee7b

See more details on using hashes here.

File details

Details for the file tkcolorpicker-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for tkcolorpicker-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f48a6e4155eea21ee9f82c4eef83dc3056ed71cb09a08ea6228c93662710d7ec
MD5 b80a37a156ad942657481e6fd6259a3a
BLAKE2b-256 724708afaeb5e66080bdbc9bfd85cda71f27f8bc2115bca1d10051c453d1de19

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page