Saravanan666/pypi-org huggingface dataset:
Package: color-bottles-puzzle
Color bottles puzzle🌡️ Watter color sort puzzle game 🧪Install and play:pip install color-bottles-puzzle

color-bottles📈 ObjectiveMake bottles full with one color or empty -> 📊📌 RulesYou can pour color water from one bottle to another only if destination bottle is not full, is empty or have same color on top.🕹️ Controls (Console frontend)To pour from bottle3to bottle7just type3 7and enter.If number of bottles less then 10, you can ommit the space 💥Also you can pour multiple times by 1 hit 🔥 - just type in a row
like5718or5 7 1 8- will pour5to7and then1to8🔴 To exit - typeq🔮 Good luck !!Examples of a game (monospaced font in console work just fine):🔮 Good luck !!


    |⬛️|    |🟦|    |⬛️|    |🟧|    |🟫|    |🟩|    |🟪|    |  |    |  |  
    |⬛️|    |🟩|    |🟫|    |🟪|    |🟩|    |🟥|    |🟫|    |  |    |  |  
    |🟧|    |🟫|    |🟥|    |🟧|    |🟧|    |🟪|    |🟦|    |  |    |  |  
    |🟩|    |🟥|    |🟦|    |🟥|    |⬛️|    |🟪|    |🟦|    |  |    |  |  
      0       1       2       3       4       5       6       7       8

 🎮 your turn:  0 7   2 7   3 0   4 2   5 4   6 3

    |  |    |🟦|    |🟫|    |🟪|    |🟩|    |  |    |  |    |  |    |  |  
    |🟧|    |🟩|    |🟫|    |🟪|    |🟩|    |🟥|    |🟫|    |⬛️|    |  |  
    |🟧|    |🟫|    |🟥|    |🟧|    |🟧|    |🟪|    |🟦|    |⬛️|    |  |  
    |🟩|    |🟥|    |🟦|    |🟥|    |⬛️|    |🟪|    |🟦|    |⬛️|    |  |  
      0       1       2       3       4       5       6       7       8

 🎮 your turn:  6 8   2 8   5 2   3 5 

    |  |    |🟦|    |  |    |  |    |🟩|    |🟪|    |  |    |  |    |  |  
    |🟧|    |🟩|    |🟥|    |  |    |🟩|    |🟪|    |  |    |⬛️|    |🟫|  
    |🟧|    |🟫|    |🟥|    |🟧|    |🟧|    |🟪|    |🟦|    |⬛️|    |🟫|  
    |🟩|    |🟥|    |🟦|    |🟥|    |⬛️|    |🟪|    |🟦|    |⬛️|    |🟫|  
      0       1       2       3       4       5       6       7       8

 🎮 your turn:FrontendThere is acoremodule (water sort rules logic) of color bottles that is frontend agnostic.
Thats why we have 2 frontends for nowconsole- usingprint()- defaultpygame- using pygame GUITo run game with pygame GUI, install package with pygame extras:python3 -m venv env
source env/bin/activate
pip install "color-bottles-puzzle[pygame]"

color-bottlesRoadmapTest for game logicTest console gameSolverLevelsMore frontendGithub actions CI
Package: colorboy
colorboyEasily add color to your stringsInstallationpip install colorboyUsageimportcolorboyascbprint(cb.cyan('Globgogabgalab'))# import specific colors, bg_colors and stylesfromcolorboyimportwhite_bg,blackprint(white_bg(black('Pog')))# import everythingfromcolorboyimport*print(green('Mayonnaise'))fromcolorboy.colorsimport*# import all colorsprint(red('EDEN'))fromcolorboy.bg_colorsimport*# import all bg_colorsprint(black_bg('Stephen'))fromcolorboy.stylesimport*# import all stylesprint(bright('Crywolf'))ColorsThese are all the color functions available through colorboy:# colors - available by importing colorboy or colorboy.colorsblackredgreenyellowbluemagentacyanwhite# bg_colors - available by importing colorboy or colorboy.bg_colorsblack_bgred_bggreen_bgyellow_bgblue_bgmagenta_bgcyan_bgwhite_bg# styles - available by importing colorboy or colorboy.stylesdimbrightDev InstructionsGet startedInstall Python (Python 3.7 works, probably other versions too)InstallPoetry. Poetry is used to manage dependencies, the virtual environment and publishing to PyPI, so it's worth learningRunpoetry installto install Python package dependenciesI recommend runningpoetry config virtualenvs.in-project true, which makes Poetry store your Python virtual environment inside the project folder. Additionally, it lets VSCode's Python extension detect the virtual environment if you set thepython.pythonPathsetting to${workspaceFolder}/.venv/bin/pythonin your settings.RunningTo test if things work, you can run the following command to open the Python REPL. Then you can write Python, such as the usage examples:poetry run pythonReleasing a new versionConsider updating the lockfile by runningpoetry update, then check if thing still workBump the version number:poetry version <version>UpdateCHANGELOG.mdBuild:poetry buildCommit and create git tagCreate GitHub release with release notes and attach the build filesPublish to PyPi:poetry publish
Package: color-bucket-logger
color_bucket_loggerPython logging Formatter for colorizing logs per thread, process, logger name, or any record attributeUsing this logging formatter to make log records that share a common attribute share a color
automatically.For example, a process with three threads could show the log entries for each thread in a different
color. The same can be done per process, or per logger name. Any log record attribute can be used
to choose the color used for the log entry.The entire log record, the particular log field (‘level’ or ‘process’ for ex.), or a group of
fields can be colorized based on an attribute value.For example, the fields for ‘thread’, ‘threadName’, ‘process’, ‘processName’ could be colorized
based on the thread id.UsageExamplesBasic config colorized by logger name:import logging

import color_bucket_logger

log = logging.getLogger('example')
log.setLevel(logging.DEBUG)

log_format = '%(asctime)s %(process)s %(levelname)s %(name)s %(funcName)s -- %(message)s'

# Use logger name for the primary color of each entry
formatter = color_bucket_logger.ColorFormatter(fmt=log_format, default_color_by_attr='name')

handler = logging.StreamHandler()
handler.setLevel(logging.DEBUG)
handler.setFormatter(formatter)

# basicConfig will add our handler to the root logger
# Note 'handlers' arg is py3 only
logging.basicConfig(level=logging.DEBUG, handlers=[handler])Color Group ExamplesExample uses of color_groups:# color almost everything by logger name
color_groups = [('name', ['filename', 'module', 'lineno', 'funcName', 'pathname'])]

color_groups = [
    ('process', ['default', 'message']),
    ('process', ['processName', 'process']),
    ('thread', ['default', 'threadName', 'message', 'unset', 'processName', 'exc_text']),
    ('thread', ['threadName', 'thread']),
    ]

# color logger name, filename and lineno same as the funcName
color_groups = [('funcName', ['default', 'message', 'unset', 'name', 'filename', 'lineno'])]

# color message same as debug level
color_groups = [('levelname', ['levelname', 'levelno'])]

# color funcName, filename, lineno same as logger name
color_groups = [('name', ['funcName', 'filename', 'lineno'])]

# color groups can be based on non standard 'extra' attributes or log record
# attibutes created from filters. In this example, a 'task' attributes.
color_groups = [('task', ['task_uuid', 'task'])]

# color default, msg and playbook/play/task by the play
color_groups = [('play', ['default','message', 'unset', 'play', 'task'])]LicenseFree software: MIT licenseFeaturesTODOHistory0.2.0 (2019-05-30)Prep for release0.1.0 (2017-06-15)First release on PyPI.
Package: colorcamp
ColorCampTestingPackageMetaThe strategic use of color in branding, marketing, and data analytics is a powerful tool that elicits emotions and simplifies comprehension of complex information. Color choice influences how audiences feel about your message, and it can make intricate data more accessible. ColorCamp is a clean way of dealing with colors, palettes, mappings, and scales, and by storing human readable metadata allow more cohesive color choices.A group of geese is a gaggle, an assembly of musicians is a band, a collective of lions is a pride. This package introduces that a collection of colors is a camp! Welcome to Color Camp!Core tenetsProvide additional context to colors so they can be used to convey consistent informationThe colors should be immediately recognized by other applications (e.g. a string, tuple, or dictionary) without additional callsEasy to import/export to and from multiple sources and frameworksBe as lightweight and portable as possible with minimal to no dependenciesInstallationThe source code is currently hosted on GitHub at:https://github.com/DrAthanas/ColorCampBinary installers for the latest released version are available at thePython
Package Index (PyPI).# from PyPIpipinstallcolorcampDependenciespython ^3.9, that's it!
Package: color-changer
DescriptionThis lightweight color-changer allows you to change the colors of a
given picture and creates a new file of it.version 1.0.4InstallationYou can install it from source or usingpip$pipinstallcolor-changerMake sure you have OpenCV installed and named cv2 as usual.Hereyou can find an article on how to set it up on OSX with Python3. The
other dependencies are installed automatically.Available ArgumentsShortLongValues-i–imagepath to image-c–changerred-green or gree-blue or blue-red-r–resultnew image nameExamples$python-mcolorchanger.colorchanger-iimage.jpg$python-mcolorchanger.colorchanger-iimage.png-cred-green
Package: colorchef
Colorchef v0.0.7This package lets you print colored text on the terminal.Author : Mithilesh PradhanUsageimport colorchef        
print(colorchef.COLORCHEF.Blue,"Hello from colorchef",colorchef.COLORCHEF.ResetAll)Alternative wayfrom colorchef import COLORCHEF    
(COLORCHEF.Blue,"Hello from colorchef",COLORCHEF.ResetAll)List of attributes available:BackgroundBlack
BackgroundBlue
BackgroundCyan
BackgroundDarkGray
BackgroundDefault
BackgroundGreen
BackgroundLightBlue
BackgroundLightCyan
BackgroundLightGray
BackgroundLightGreen
BackgroundLightMagenta
BackgroundLightRed
BackgroundLightYellow
BackgroundMagenta
BackgroundRed
BackgroundWhite
BackgroundYellow
Black
Blink
Blue
Bold
Cyan
DarkGray
Default
Dim
Green
Hidden
LightBlue
LightCyan
LightGray
LightGreen
LightMagenta
LightRed
LightYellow
Magenta
Red
ResetAll
ResetBlink
ResetBold
ResetDim
ResetHidden
ResetReverse
ResetUnderlined
Reverse
Underlined
White
YellowThanks for the support!!Follow me on LinkedIn belowMithilesh Pradhan - Linkedin
Package: colorclass
colorclassYet another ANSI color text library for Python. Provides "auto colors" for dark/light terminals. Works on Linux, OS X,
and Windows. For Windows support you just need to callWindows.enable()in your application.On Linux/OS Xautocolorsare toggled by callingset_light_background()andset_dark_background(). On Windows
this can be done automatically if you callWindows.enable(auto_colors=True). Even though the latest Windows 10 does
support ANSI color codes natively, you still need to run Windows.enable() to take advantage of automatically detecting
the console's background color.In Python2.x this library subclassesunicode, while on Python3.x it subclassesstr.Python 2.6, 2.7, PyPy, PyPy3, 3.3, 3.4, and 3.5 supported on Linux and OS X.Python 2.6, 2.7, 3.3, 3.4, and 3.5 supported on Windows (both 32 and 64 bit versions of Python).QuickstartInstall:pipinstallcolorclassPiped Command LineIt is possible to pipe curly-bracket tagged (or regular ANSI coded) text to Python in the command line to produce color
text. Some examples:echo"{red}Red{/red}"|python-mcolorclass# Red colored text.echo-e"\033[31mRed\033[0m"|COLOR_DISABLE=truepython-mcolorclass# Strip colorsecho-e"\033[31mRed\033[0m"|COLOR_ENABLE=truepython-mcolorclass&>file.txt# Force colors.Export these environment variables as "true" to enable/disable some features:=============== ============================================
Env Variable    Description
=============== ============================================
COLOR_ENABLE    Force colors even when piping to a file.
COLOR_DISABLE   Strip all colors from incoming text.
COLOR_LIGHT     Use light colored text for dark backgrounds.
COLOR_DARK      Use dark colored text for light backgrounds.
=============== ============================================Example ImplementationSource code for the example code is:example.pyUsageDifferent colors are chosen using curly-bracket tags, such as{red}{/red}. For a list of available colors, callcolorclass.list_tags().The available "auto colors" tags are:autoblackautoredautogreenautoyellowautoblueautomagentaautocyanautowhiteautobgblackautobgredautobggreenautobgyellowautobgblueautobgmagentaautobgcyanautobgwhiteMethods of Class instances try to return sane data, such as:fromcolorclassimportColorcolor_string=Color('{red}Test{/red}')>>>color_stringu'\x1b[31mTest\x1b[39m'>>>len(color_string)4>>>color_string.istitle()TrueThere are also a couple of helper attributes for all Color instances:>>>color_string.value_colors'\x1b[31mTest\x1b[39m'>>>color_string.value_no_colors'Test'Change Log
Package: colorclip
colorclip 1.0.6Color pack library,python terminal consoleInstallationpip install colorclipUsageImport all name from colorclipfrom colorclip import *FirstRunprint(red('sample string'))Bold Stringprint(bold('bold string'))Underlineprint(underline("underline"))Background colorprint(bg_red(lime('sample string')))Check available colorp_ac()Available colorText ColorBackground Colorblackbg_blackredbg_redgreenbg_greenyellowbg_yellowbluebg_bluemagentabg_magentacyanbg_cyanwhitebg_whitegraybg_graybright_redbg_bright_redbright_greenbg_bright_greenbright_yellowbg_bright_yellowbright_bluebg_bright_bluebright_magentabg_bright_magentabright_cyanbg_bright_cyanbright_whitebg_bright_whiteorangebg_orangepinkbg_pinklimebg_limetealbg_teallavenderbg_lavenderRainbowrainbow ("string")Blinkblink("string")Defaultrepeat=5delay=0.5Customblink("string", repeat=10, delay=0.2)Typewritertypewriter("String")DefaultDelay=0.1Wavywavy("string")Defaultamplitude=1frequency=1Vaporwavevaporwave("string")Rainbow typewritercc_text("string")Defaultdelay=0.1Helphelp()
Package: colorcluster
colorclusterReducing Color of pictures by KMeans clustering.Optionsinput_fig_pathThe file path of the image to be processed.color_numSet the number of colors to be reduced. Default:8show_imgPop up the processed picture when descripted.export_fig_pathSet the file path of output picture. Default:"result.jpg"export_color_arrayOutputs the central color obtained by clustering in CSV format when descripted.export_array_pathSet  the file path of output of the above CSV file. Default:"array.csv"
Package: colorcode
A library that creates multi-colored Aztec codes.
They are actually multiple Aztec codes, merged into a single image.
Usually they are each on a separate color channel.Command line toolThis package comes with thecolorcodecommand, that creates a color code.For instance:colorcode"Hello World""Python 3 RuleZ""Let's go Aztec"Will create a code with dataHello World,Python 3 RuleZandLet's go Aztec.
Each data string must be surrounded by quotes if you run the command from a shell,
because each parameter to the command becomes a separate data set.You can override default settings with various parameters:colorcode-omycode.png-m4-iredcyan"Hello World""Python 3 RuleZ"-omycode.pngmeans “Save the image to the filemycode.png”-m4means “Each square block (aka module) will have a size of 4x4 pixels”-iredcyanmeans “Use the Red/Cyan method to combine the codes instead of the default”By default the combination method is chosen automatically depending on the number of data entries.There are more parameters, you can find them out with--helpas usual.You can also run the command as a Python module:python3-mcolorcode.About the projectDon’t expect the project to be improved or maintained in the future.
This was mostly a learning project for me, to learn about Cython, Sphinx docs,
Python packagaing and Aztec codes.It works, and it’s fun, so I share it. But it’s currently mostly useless.
There is no app to decode the codes and I don’t plan to make one.Anyway, I hope you will find this project interesting and inspiring.
Package: colorcodeconvert
colorcodeconvertpip install colorcodeconvertExamplesFrom HEX to RGBfromcolorcodeconvertimport*# Prints the RGB value associated with the given HEX value.print(convert(HexCode("#A0A0A0"),RGB))From RGB to HEXfromcolorcodeconvertimport*# Prints the HEX value associated with the given RGB value.print(convert(RgbCode(160,160,160),HEX))CreditsREADME Badges made withShields.io.LicenseThis software is licensed under the GNU General Public License version 3.
Package: color-codes
color-codescolor-codes is a python package allowing easy access and use of RGB and HEX values of various colors.InstallationUse the package managerpipto install color-codes.pipinstallcolor-codesUsageimportcolor_codesascolor# prints '(128, 128, 128)'print(color.GREY.rgb)# prints '#808080'print(color.GREY.hex)LicenseMIT
Package: colorcompass
ColorCompassOverviewColorCompass is a Python library designed to efficiently find the  named color to a given RGB value by using an efficient Euclidean distance calculation across a range of predefined colors.How it WorksThe Euclidean Distance CalculationThe crux of ColorCompass lies in utilizing the Euclidean Distance formula to find the  matching color name for a given RGB input. Given an RGB value, the Euclidean Distance between two points (color values, in our context) in a three-dimensional space (R, G, B) is calculated as:Distance = √(R_2 - R_1)^2 + (G_2 - G_1)^2 + (B_2 - B_1)^2Here,(R_1, G_1, B_1) and (R_2, G_2, B_2) are the RGB values of the two colors being compared.The formula basically measures the straight-line distance between two points in a 3D space (your two colors, in the RGB color space).The Algorithmic ApproachInput Color Value: A user inputs an RGB color value that they'd like to map to a named color.Distance Calculation: For the input color, ColorCompass calculates the Euclidean Distance between the input RGB value and all stored RGB values in the library's color database, effectively identifying which stored color is (has the minimal Euclidean Distance) to the provided input.Return  Color: The algorithm identifies the color name associated with the RGB value in the database that has the smallest Euclidean Distance to the input color. This color name is returned to the user as the closest match.🚀 InstallationYou can install ColorCompass using pip:pipinstallcolorcompass🎨 Basic UsageTo find the color name for a given RGB value, simply use theget_color_namefunction as follows:fromcolorcompassimportget_color_name# Define your target color as an RGB list or a hexadecimal stringtarget_color_rgb=[152,251,152]target_color_hex="#98FB98"# Use the function to find the color namecolor_name_rgb=get_color_name(target_color_rgb)color_name_hex=get_color_name(target_color_hex)# Print the found color nameprint(f"Color to RGB{tuple(target_color_rgb)}:{color_name_rgb}")print(f"Color to{target_color_hex}:{color_name_hex}")📄 LicenseColorCompass is licensed under the MIT License. See theLICENSEfile for more details.🙌 ContributingContributions are welcome! Please read theCONTRIBUTINGfile for details on our code of conduct and the process for submitting pull requests.📞 ContactIf you have questions or issues, pleaseopen an issue.🙏 AcknowledgementsSpecial thanks toxkcd by Randall Munroefor providing an extensive collection of nearly 1000 color names and their respective codes, which was pivotal in developing this project. Although modifications were made to the original list, it served as a foundational resource in building the ColorCompass library.
Package: colorcon
Colored consoleA simple module based onc++andbind with a pythonfor a colored console.Main page on githubNOTES:Compiled with gcc.Ansi will enable automatically!Not support all consoles!Docs:Simplyimportwith:importcolorconDefaults:This module contains some defaults as says:Colorsin class COLORS:'black'orCOLORS.Black'white'orCOLORS.White'red'orCOLORS.Red'yellow'orCOLORS.Yellow'green'orCOLORS.Green'blue'orCOLORS.blue'purple'orCOLORS.Purple'orange'orCOLORS.OrangeModesin class MODES:'bold'orCOLORS.Black'light'orCOLORS.White'italic'orCOLORS.Red'underline'orCOLORS.YellowNote: thesearen't supportedon all consoles'slowblink'orCOLORS.Green'rapidblick'orCOLORS.blue'reverse'orCOLORS.PurpleMembers:colorcon.coloredCan customize your texts!Examples:Forcolored textuse:colorcon.colored('im colored(with red bg and white fg)!','red',COLORS.White)or you can create your custom color:colorcon.colored('im rgb',[1,2,3])You can addmodesto output:colored.colored("i'm bold and i have undeline",modes=['bold',MODES.Underline])or you can simply mix modes like:\mode=MODES.bold|MODES.Underlinecolorcon.set_backgroundCan set color for background!NOTES:Console will not reset(The color will be available)Examples:Set background color to redcolorcon.set_background('red')# set background color redcolorcon.set_background([255,0,0])# set background color with rgbThen print some text that are redcolorcon.output('iam red')colorcon.set_foregroundSame ascolorcon.set_backgroundbut adjust foreground!colorcon.reset_allWill reset console(Colors was set will be reset)colorcon.outputsame as python print, But it always flushes stdout after every print!
Package: color-console-py
color_console_pySmall tool that enables you to write to the console in color using context mangers or f-strings.It uses ANSI codes to color the console.How to useGetting a colorCreating a color requiresstyle,colorandbackground, all of which can be called as positional or keyword arguments.
If not specified they will default to the console's default.Colors can also be called as attributes ofColoror strings:Color.black=0Color.red=1Color.green=2Color.yellow=3Color.blue=4Color.pink=5Color.brown=6Color.white=7Possible ways to call:fromcolor_consoleimportColorColor(1,2,3)# resulting color will be in style 1, color green, background yellowColor()# resulting color will in default style, default color, default backgroundColor(1,"black","white")#resulting color will be in style 1, color black, background whiteColor(color=Color.red)# resulting color will be in default style, color red, default backgroundThere are also some color presets likeerror/err,success/succ,warning/warn,info,
that can be called with the positional keywordnameor as an attribute ofColor.In this you can also define your own colors:fromcolor_consoleimportColorColor(name="error")# resulting color will be style 1, color red, background blackColor.info# resulting color will be style 1, color blue, default backgroundColor.test=Color(1,Color.pink,Color.brown)# color savedColor.test# resulting color will be style 1, color pink, background brownUsing a colorUsing a color can be done by printing it directly or using context managers:Simple example:fromcolor_consoleimportColorcol1=Color(1,2,3)# get your colorprint(col1.start())# changes your console to the desired color/styleprint("This is in color/style specified by col1")col2=Color(4,5,6)# get your color, no need to reset beforeprint(col2.start())print("This is in color/style specified by col2")print(col2.stop())# resets the colorBetter example using implicit conversion to str in f-strings:fromcolor_consoleimportColorprint(f"{Color(1,2,3)}This is in the first color,{Color(4,5,6)}This is in the second color,{Color.end}This is in the default color")Using context managers:fromcolor_consoleimportColorwithColor.info:print("This will be in the specified color")print("You can print as much as you want in the with-statement")print("This will be in the default color again")Color combinationsHere it shows the used ANSI codes in its respective style and color.
The following are the numbers that are used under the hood (the Color class uses the numbers 0-8 for everything)First number (0-7): StyleSecond number(30-37): Text colorThird number(40-47): Background colorStyle 0Style 1Style 2Style 3Style 4Style 5Style 6Style 7Misc
Package: color-convert
Hexadecimal to rgbfromcolor_convertimportcolorrgb=color.hex_to_rgb('#fff000')print(rgb)# rgb(255,240,0)Hexadecimal to rgbafromcolor_convertimportcolorrgba=color.hex_to_rgba('#fff000')print(rgba)# rgba(255,240,0,1)Decimal to hexadecimalfromcolor_convertimportcolorhex=color.ten_to_hex(16711680)print(hex)# #ff0000Decimal to rgbfromcolor_convertimportcolorhex_rgb=color.ten_to_rgb(16711680)print(hex_rgb)# rgba(255,0,0,1)