Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ctk-color-picker-alpha

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ctk-color-picker-alpha

An eight-digits hex code color picker, with alpha value.

  • 0.8.9
  • PyPI
  • Socket score

Maintainers
1

CTkColorPickerAlpha

A special color picker that supports picking transparent color (8-digits hex code)

default colored

Download

pip install ctk-color-picker-alpha

Requirements

  • customtkinter
  • pillow
  • numpy

How to use?

import customtkinter as ctk
from ctk_color_picker_alpha import *


def ask_color():
    pick_color = AskColor()  # open the color picker
    color = pick_color.get()  # get the color string
    print(color)


root = ctk.CTk()

button = ctk.CTkButton(master=root, text="CHOOSE COLOR", text_color="black", command=ask_color)
button.pack(padx=30, pady=20)
root.mainloop()

Options

ArgumentsDescription
widthset the overall size of the color picker window, always greater than 300 pixels
titlechange the title of color picker window
fg_colorchange foreground color of the color picker frame
bg_colorchange background color of the color picker frame
button_colorchange the color of the button and slider
button_hover_colorchange the hover color of the buttons
textchange the default text of the 'OK' button
initial_colorset the default color of color picker (currently in beta stage)
slider_borderchange the border width of slider
corner_radiuschange the corner radius of all the widgets inside color picker
enable_previewerif True, display the color previewer
enable_alphaif True, enable 8-digits hex code and transparency. Otherwise, use 6-digits hex code and disable transparency
allow_hexcode_modificationif True, enable modifications to hex code textbox
enable_random_buttonif True, display the 'Random' button
**other button parameterspass other button arguments if required

ColorPickerWidget

This is a new color picker widget that can be placed inside a customtkinter frame.

widget

Usage

from ctk_color_picker_alpha import *
import customtkinter

root = customtkinter.CTk()
colorpicker = CTkColorPicker(master=root)
colorpicker.pack(padx=10, pady=10)
root.mainloop()

Options

ArgumentsDescription
masterparent widget
widthset the overall size of the color picker window, always greater than 300 pixels
titlechange the title of color picker window
fg_colorchange foreground color of the color picker frame
bg_colorchange background color of the color picker frame
button_colorchange the color of the button and slider
button_hover_colorchange the hover color of the buttons
textchange the default text of the 'OK' button
initial_colorset the default color of color picker (currently in beta stage)
slider_borderchange the border width of slider
corner_radiuschange the corner radius of all the widgets inside color picker
enable_previewerif True, display the color previewer
enable_alphaif True, enable 8-digits hex code and transparency. Otherwise, use 6-digits hex code and disable transparency
allow_hexcode_modificationif True, enable modifications to hex code textbox
enable_random_buttonif True, display the 'Random' button
**other button parameterspass other button arguments if required

Forked from https://github.com/Akascape/CTkColorPicker

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc