Giter VIP home page Giter VIP logo

ctkcolorpicker's Introduction

CTkColorPicker

A modern color picker made for customtkinter!

Screenshot

Download

pip install CTkColorPicker

GitHub repo size

Requirements

How to use?

import customtkinter as ctk
from CTkColorPicker import *

def ask_color():
    pick_color = AskColor() # open the color picker
    color = pick_color.get() # get the color string
    button.configure(fg_color=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

Arguments Description
width set the overall size of the color picker window
title change the title of color picker window
fg_color change forground color of the color picker frame
bg_color change background color of the color picker frame
button_color change the color of the button and slider
button_hover_color change the hover color of the buttons
text change the default text of the 'OK' button
initial_color set the default color of color picker (currently in beta stage)
slider_border change the border width of slider
corner_radius change the corner radius of all the widgets inside color picker
**other button parameters pass other button arguments if required

ColorPickerWidget

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

Screenshot

Usage

from CTkColorPicker import *
import customtkinter

root = customtkinter.CTk()
colorpicker = CTkColorPicker(root, width=500, command=lambda e: print(e))
colorpicker.pack(padx=10, pady=10)
root.mainloop()

Options

Arguments Description
master parent widget
width set the overall size of the color picker frame
fg_color change forground color of the color picker frame
initial_color set the default color of color picker (currently in beta stage)
slider_border change the border width of slider
corner_radius change the corner radius of all the widgets inside color picker
command add a command when the color is changed
orientation change orientation of slider and label
**other slider parameters pass other slider arguments if required

That's all, hope it will help!

ctkcolorpicker's People

Contributors

akascape avatar hellohackynow avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.