Code Monkey home page Code Monkey logo

ctkcolordisplay's Introduction

CTkColorDisplay

CTkColorDisplay is a customtkinter extension that adds a new widget to display colors

NOTE: i made this for one of my own projects and decided to upload it,
there are probably better way to display colors but i needed it this way

picture of widget

code for above window

import CTkColorDisplay
import customtkinter 

root = customtkinter.CTk()

a = CTkColorDisplay.CTkColorDisplay(root,display_width=100,display_height=100,display_color="#00ff00")
a.grid(row=0,column=0,padx=10,pady=10)

root.mainloop()

Arguments

Parameter Description type optional
master the master widget or window any mandatory
display_color a hex code for the color to display str optional
variable a variable to trace the display color wil be set to this customtkinter.StringVar optional
display_image the image used to display the color al white(#ffffff) pixels will be replaced with the display_color str OR PIL.Image.Image optional
display_width the width of the display in px int optional
display_height the height of the display in px int optional
frame_width the width of the entire widget(replaces "width" from customtkinter.CTkFrame) int optional
frame_height the height of the entire widget(replaces "height" from customtkinter.CTkFrame) int optional
*other parameters other parameters of customtkinter.CTkFrame can also be passed -depends- optional

Methods

.set_color(color:str)

change the display color

.configure(**kwargs)

change:
    display_width: int
    display_height: int
    display_image: str | PIL.Image.Image
    all configurable args of customtkinter.CTkFrame

Instalation*

*for windows i dont know about other operating systems

  • download CTkColorDisplay.zip from Releases
  • right click on the downloaded file and select "extract all"
  • click "browse" and select the folder your project is stored in OR C:/users/<username>/appdata/local/programs/python/python<version>/lib/site-packages

ctkcolordisplay's People

Contributors

pimwagemans09 avatar

Stargazers

 avatar

Watchers

 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.