Saravanan666/pypi-org huggingface dataset:
Package: colorscale
Python package colorscaleThis package was written to facilitate working with ‘false color’. Many
scientific fields work with image files to visualize two-dimensional
scalar data. The raw data can then be represented as a grayscale image.
For different reasons, representing these data in false color can be
useful.This package helps to convert grayscale images to ‘false
color’.On the other hand, quite often it is desirable to have access
to the original values of a false color plot. If the color scale (or
‘color map’) is known and it is bijective (a reversible one to one
mapping), the original gray scale image can be recovered from the false
color image using this tool, too.Installationpip install colorscaleUsageAfter installing, two command line tools will be available:to_color_scaleandto_gray_scale.Start them with the--helpflag to learn how to use them:$ to_color_scale --help
usage: to_color_scale [-h] -s {tillscale} [-b {pil,cv2}] IMAGEFILE

Convert an image saved as false color to grayscale

positional arguments:
  IMAGEFILE             The image to convert

optional arguments:
  -h, --help            show this help message and exit
  -s {tillscale}, --colorscale {tillscale}
                        Desired color scale
  -b {pil,cv2}, --backend {pil,cv2}and$ to_gray_scale --help
usage: to_gray_scale [-h] -s COLORSCALE IMAGEFILE

Convert an image saved as false color to grayscale

positional arguments:
  IMAGEFILE             The image to convert

optional arguments:
  -h, --help            show this help message and exit
  -s COLORSCALE, --colorscale COLORSCALE {tillscale}
                        Desired color scaleAuthorPhilipp Klausphilipp.l.klaus@web.de
Package: colors-cli
Colors-cliThe colors-cli help you for backlight and formatting your cli textUsage:fromcolors_cliimportClrsprint(Clrs.green("Hello world!"))# Output green text in cliprint(Clrs.blue("Hello world!"))# Output blue text in cliprint(Clrs.warn("Warning!"))# Output yellow colorprint(Clrs.fail("Error!"))# Output red colorprint(Clrs.bold(Clrs.violet(Clrs.bckg("Hello world!"))))# Output bold and violet with background textOutputAll methods:green(string) -> str- Return green stringblue(string) -> str- Return blue stringcyan(string) -> str- Return cyan stringwarn(string) -> str- Return yellow stringfail(string) -> str-  Return fail stringviolet(string) -> str- Return violet stringbold(string) -> str- Return bold stringunderline(string) -> str- Return underline stringbckg(string) -> str- Return string with backgroundAll fields:ENDC- For end colorREDBLUECYANGREENVIOLETYELLOWBOLDUNDERLINEBACKGROUNDEnjoy using! :)
Package: colors-core
colors-coreCore color functionality.InstallingPython 3.8 or above is required.pipInstalling the library withpipis quite simple:$pipinstallcolors-coreAlternatively, the library can be installed from source:$gitclonehttps://github.com/nekitdev/colors-core.git$cdcolors-core$python-mpipinstall.poetryYou can addcolors-coreas a dependency with the following command:$poetryaddcolors-coreOr by directly specifying it in the configuration like so:[tool.poetry.dependencies]colors-core="^1.1.1"Alternatively, you can add it directly from the source:[tool.poetry.dependencies.colors-core]git="https://github.com/nekitdev/colors-core.git"Examples>>>fromcolorsimportColor>>>color=Color(0x000000)>>>print(color)#000000>>>color.to_rgb()(0,0,0)>>>color.to_rgba(0)(0,0,0,0)>>>color.to_hsv()(0.0,0.0,0.0)DocumentationYou can find the documentationhere.SupportIf you need support with the library, you can send anemailor refer to the officialDiscord server.ChangelogYou can find the changeloghere.Security PolicyYou can find the Security Policy ofcolors-corehere.ContributingIf you are interested in contributing tocolors-core, make sure to take a look at theContributing Guide, as well as theCode of Conduct.Licensecolors-coreis licensed under the MIT License terms. SeeLicensefor details.
Package: colorsensing
python-package-exampleThis is a minimal python package, for use alongside the lesson:https://github.com/BillMills/pythonPackageLessonContributing:Please do! Guidelines:This lesson is for beginners. Yes there are plenty of super fancy things we don’t cover here; someday, we’ll make a different, super fancy lesson to teach those things.Max 100 lines per PR please.Open an issue or empty PR first to talk about controversial changes.
Package: colorsep
# ColorSepA utility for separating a single png (such as one produced by an [inkscape](https://inkscape.org/) export) intoseparate per-color images such as might be useful for silk screen printing at a place like[ooshirts](http://www.ooshirts.com).## FeaturesThe current feature set includes:- separation into a specifiable number colors- a "near pixel threshold" option for fuzzily matching colors that are close but not exactly what's expected- a "white base" option to produce a white pixel under all active pixels of any color- a specifiable alpha threshold beneath which all pixels will be discarded## RequirementsColorsep probably requires python 3.  I'll gladly accept PRs to fix this and/or assertions to the contrary.  I justhaven't tested it.## InstallIt should be as simple as `pip install colorsep` for python-friendly folks.## Basic usageTo generate the images I needed to make my t-shirt, I ran this:```colorsep --input resources/farm_scene.png --output-base output/output_ --num-colors=7 --base-white --near-pixel-threshold=100```To get help:```$ colorsep --helpUsage: colorsep [OPTIONS]Options:--input TEXT                    input png--output-base TEXT              base name of output pngs--alpha-threshold INTEGER       on/off threshold for alpha--num-colors TEXT               use to set number of output colors--base-white                    should all color be underlaid with white?--near-pixel-threshold INTEGER  tolerance for nearest-color computation--help                          Show this message and exit.$```
Package: colorset
ColorsetA set of classes for working with color legends.UsageTo use the library, you need to import it and call the function getLegend(cs_file, sys_cs_file, colorset_used),
where cs_file is the full name of the main legend XML file,
sys_cs_file is the full name of the additional legend XML file,
and colorset_used is the name of the desired legend.The function returns a tuple legend, colorType, where legend is an object of the class ColorSetNumerical, ColorSetString, or ColorSetAutomatic, depending on the contents of the legend files, and colorType is a string indicating the type of legend from the list ['numerical', 'string', 'automatic'].The following methods are supported:show() - displays the contents of the legend in the standard console.
createDescription() - automatically fills in the description property.
valueToColor(value) - calculates the integer color code based on the parameter value.Required FilesMain and additional XML files containing the color legends.IntegrationThe library requires the presence of lxml.etree for operation.Related ProjectsThe library was developed for use with its own projects.Future PlansImplementation of the ability to edit legends and save them in XML files. Integration to work with a PostgreSQL database. Preparation of a GUI - a visual legend editor.Current StatusDebugging.
Package: colorsnap
# ColorsnapPython package for snaping/rounding colors to other colors/palettes.Colorsnap comes with predefined palettes for CSS 2-4 and can also take custom ones defined by you as input and then snap/round a specified color to the closes one in the given palette.## Installing```pythonpip install colorsnap```# Usage Examples```pythonimport colorsnap'''Available palettes:- CSS_2- CSS_2_1- CSS_3- CSS_4'''colorsnap.snap_color(colorsnap.palettes.CSS_3, '#0000ba')# >>> ('#0000ba', 'mediumblue')# Using a custom palettepalette = {'black': '#000000','gray': '#808080','white': '#ffffff',}colorsnap.snap_color(palette, '#0000ba')# Using a custom palette with unnamed colorspalette = ['#4286f4', '#414449']color_snap.snap_color(palette, '#5588db')# >>> ('#5588db', '#4286f4')```
Package: colorsnip
ColorSnipCommand line tool: Copies the content of the given file (or stdin) to the clipboard
with syntax coloring, so it can be pasted into a format-retaining software.InstallationCompatible with:MacOS viarichxeroxLinux and Windows (untested) viaklemboard$pipinstallcolorsnipUsage:$colorsnip[filename|-]Use casePasting formatted code for a presentation in Keynote or the like.If you want to access theHTML/RTFcontent directly, usepygmentsand the CLI toolpygmentizethat it provides.Caveatsrichxerox dependency seems to install half of PyPIUntested on Linux and WindowsLinux and Windows get theHTMLrich text format only, while MacOS get HTML and RTF.LicenseMIT (see top of code file)Code of conductThis project follows thecontributor covenant.For any feedback, contact the author via an issue, ortwitteror by email (first name at last name dot fr).
Package: colorsort
The colorsort python library provides algorithms for sorting colors.You can use colorsort to:Convert an image into a color vectorReduce the number of colors in a color vector while maintaining the overall palleteSort the colors in a color vectorFor an interactive demo check outthis jupyter notebook.Example converting image into color vector:>>> import colorsort as csort
>>> num_x_pixels = 16
>>> num_y_pixels = 16
>>> num_channels = 3
>>> image_shape = (num_x_pixels, num_y_pixels, num_channels)
>>> image_rgb = np.random.randint(0,255,image_shape).astype(np.uint8)
>>> vec_rgb = csort.image_to_vec(image_rgb)Casting the array to uint8 is crucial.
Colorsort uses opencv under the hood and expects uint8.Example reducing the number of colors in a color vector>>> print(vec_rgb.shape)
(256, 3)
>>> vec_rgb_reduced = csort.reduce_colors(vec_rgb, 10)
>>> print(vec_rgb_reduced.shape)
(10, 3)Colors are reduced using K-means clustering in the LAB colorspace.
If the input has fewer than 10 colors,
a copy of the input color vector is returned.Example sorting colors in a color vector>>> vec_rgb_sorted = csort.sort_colors(vec_rgb_reduced)
>>> print(vec_rgb_sorted.shape)
(10, 3)The color sorting algorighm maps the problem of sorting colors onto
a travelling salesman problem.
The route starts at the brightest color,
and ends at the darkest color.
The distance between two colors is calculated using the
Delta E CIE2000 standard.
By finding the shortest path that visits all colors
the resulting colors are perceptually sorted,
with minimal jumps between neighboring colors.
This is useful for constructing colormaps from arbitrary images.
Package: colorspacelib
ColorSpaceLibColorSpaceLib is a python color library designed to make working with color much easier and Intresting with python.InstallationpipinstallcolorspacelibUsage>>>fromcolorspacelib.colorspaceimportColor>>>mygreen=Color('#7CFC00')>>>mygreen.shade()'green'>>>myorange=Color('255,179,71')>>>myorange.shade()'orange or brown'>>>myred=Color('D73B3E')>>>myred.shade()'red'The Colorspacelib package comes with some predifined colors which can be imported and used in your script.>>>importcolorspacelibascsl>>>print(csl.black)#000000>>>print(csl.green)#00ff00>>>print(csl.blue.toRgb())(0,0,255)Color Instances also supports mixing of two color using Theadditivecolor mixing.>>>importcolorspacelibascsl>>>new_col=csl.green+csl.yellow>>>print(new_col)127,191,0>>>new_col.shade()'yellow-green'There is also a converter module inside the colorspacelib that contains function for convertion of a color format to another. The functions are listed as follows :HexrgbrgbHexrgbHsvhsvRgbrgbHslhslRgbrgbCmykcmykRgbContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.LicenseThis Project is under TheMITLicense.
Package: colorspacious
Colorspacious is a powerful, accurate, and easy-to-use library for
performing colorspace conversions.In addition to the most common standard colorspaces (sRGB, XYZ, xyY,
CIELab, CIELCh), we also include: color vision deficiency (“color
blindness”) simulations using the approach of Machado et al (2009); a
complete implementation ofCIECAM02; and the perceptually
uniform CAM02-UCS / CAM02-LCD / CAM02-SCD spaces proposed by Luo et al
(2006).To get started, simply write:from colorspacious import cspace_convert

Jp, ap, bp = cspace_convert([64, 128, 255], "sRGB255", "CAM02-UCS")This converts an sRGB value (represented as integers between 0-255) to
CAM02-UCSJ’a’b’coordinates (assuming standard sRGB viewing
conditions by default). This requires passing through 4 intermediate
colorspaces;cspace_convertautomatically finds the optimal route
and applies all conversions in sequence:This function also of course accepts arbitrary NumPy arrays, so
converting a whole image is just as easy as converting a single value.Documentation:http://colorspacious.readthedocs.org/Installation:pip install colorspaciousDownloads:https://pypi.python.org/pypi/colorspacious/Code and bug tracker:https://github.com/njsmith/colorspaciousContact:Nathaniel J. Smith <njs@pobox.com>Dependencies:Python 2.6+, or 3.3+NumPyDeveloper dependencies (only needed for hacking on source):nose: needed to run testsLicense:MIT, see LICENSE.txt for details.References for algorithms we implement:Luo, M. R., Cui, G., & Li, C. (2006). Uniform colour spaces based on
CIECAM02 colour appearance model. Color Research & Application, 31(4),
320–330. doi:10.1002/col.20227Machado, G. M., Oliveira, M. M., & Fernandes, L. A. (2009). A
physiologically-based model for simulation of color vision
deficiency. Visualization and Computer Graphics, IEEE Transactions on,
15(6), 1291–1298.http://www.inf.ufrgs.br/~oliveira/pubs_files/CVD_Simulation/CVD_Simulation.htmlOther Python packages with similar functionality that you might want
to check out as well or instead:colour:http://colour-science.org/colormath:http://python-colormath.readthedocs.org/ciecam02:https://pypi.python.org/pypi/ciecam02/ColorPy:http://markkness.net/colorpy/ColorPy.html
Package: colorsphere
# Colorsphere - An RGB color picker with colors arranged in a 3D sphere.This module implements an interactive 3-dimensional color picker -
to the author’s knowledge the first ever 3-dimensional color picker.The color sphere represents the whole color body, where one pole
is black, the other pole is white, and the color circle is around the
equator. If you follow a meridian from the black pole, the color will
gradually increase in strength to its maximum brilliance and then
seamlessly continue to become brighter all the way to white. Less
saturated colors are inside the sphere. The axis through the middle of
the sphere between the poles contains all grays from black to
white. Thus, the hue is represented by the longitude, the lightness by
the latitude, and the saturation by the proportion from the surface to
the center black-white axis of the sphere. You can rotate the sphere
either by dragging the surface, or using the scroll wheel. Shift-
scrolling goes sideways. Control scrolling goes inside the spere.In the default usage, clicking a color in the sphere will print out
its RGB and HSL (hue, saturation, lightness) color coordinates.
Package: colorsplash-common
colorsplash-commonDescriptioncolorsplash-common (CSC) is a component of the overarching ColorSplash web application that can be found athttps://thurau.io/colorsplash/. ColorSplash allows users to browse royalty free images that have colors within a certain Euclidean distance of a provided HEX code. CSC is a python library hosted on PyPi to allow common features to be included as dependencies within the other python componenets.You can see other components of this project in the following Github reposColorSplashPhotoRetrievalColorSplashPhotoProcessorColorSplashColorDetectorthurau.ioMotivationA friend was facing issues when trying to create social media posts for an ecommerce company we recently launched. She had developed a branding guide and had chosen what colors she wanted to include in the website, logos, and eventual marketing material. But when it was time to make marketing posts, trying to apply that style guide was difficult. For all the tools on the internet she used, none were able to query royalty free images that were close to the HEX color codes she had selected. This project was born to remedy this issue.I wanted to provide a clean minimal interface on a website that would have a form for a HEX code, and query a REST API that would return royalty free images that had a subset of colors within close to the original HEX code.Tech UsedCSC is a very simple python library that tightly couples integration with the various DynamoDB tables in the project. It uses boto3 as the client library.InstallationCloning The ProjectYou can either fork the repo or clone it directly with$gitclonehttps://github.com/DanielThurau/colorsplash-common.git
$cdcolorsplash-commonDevelopingThis project usespoetryto build, test, and publish.To install dependencies run$poetryinstallTo run the unit tests run$poetryrunpytestUsageCSC is hosted on PyPi so you can use any tool that integrates with PyPi to bring it in as a dependency. The easiest way is with pip. For example$pipinstallcolorsplash-common// TODO link a Github gist showing the use of the libraryContributeIf you'd like to contribute, fork the project and submit a Pull Request.LicenseSee LICENSE.mdMIT LicenseCopyright (c) 2021 Daniel Thurau
Package: colorspot
ColorSpotThis script is a command line DX cluster client. It adds the following benefits to the default telnet stream:displays the DX station's countrydisplays the DX station's continentdisplays if the DX station uses LotWdownloads your LotW QSL file and marks all lines with countries that need to be confirmed (optional)displays lines in different colors depending on the continent or band (user configurable)ScrenshotLimitationsThe following limitations are present:read-only: you can't send commands to the dx cluster server via this toolno filters: you need to configure your filter on the serverInstallationColorSpot needs Python 3 and the following libraries:coloredrequestsFurthermore, you need an account at LotW for some of the features.Before installing ColorSpot, please make sure that pip, setuptools and wheel are installed and up-to-date:# python3 -m pip install --upgrade pip setuptools wheelFinally, install ColorSpot with pip:# python3 -m pip install colorspotUpdatingTo update colorspot, execute the following command:# python3 -m pip install --upgrade colorspotUsageexecute the application with "colorspot"colorspot creates a default config file and states its location (e.g.~/.config/colorspot/colorspot.ini)adapt~/.config/colorspot/colorspot.inito your needs. Important setting are:cluster/host and cluster/port: Change this if you want to use another cluster servercluster/user: Enter here your call signlotw/user: Enter here your lotw user name (your call sign). Leave at "N0CALL" to disable this feature.lotw/password: Enter here your lotw passwordlotw/mode: Enter here the mode you would like to filter the QSL download from LotWexecute the application again with "colorspot"the software now tries to download the following files and stores them into the configuration directory:https://www.country-files.com/bigcty/download/bigcty.zip(will be extracted)https://lotw.arrl.org/lotw-user-activity.csvhttps://lotw.arrl.org/lotwuser/lotwreport.adi?login={}&password={}&qso_query=1&qso_qsl=yes&qso_mode={}&qso_qsldetail=yes&qso_qslsince=1970-01-01Licensesee
Package: color-spray
Color SpraySTEM images colorization using Deep Convolutional Neural Networks.InstallingA. Install and update usingpip:pip3installcolor-sprayOrgitcheckouthttps://github.com/fengwang/color_spray.gitcdcolor_spray
python3-mpipinstall-e.B. Dowload pretrained model files fromhttps://drive.google.com/drive/folders/1dl-iNgROmSv71EpzNalh97zksKIBc90u?usp=sharing, place them in your home folder, under path.color_spray/model.UsageCommand line:color_sprayINPUT_GRAY_IMAGE_PATHOUTPUT_RGB_IMAGE_PATHUsing Python API:# uncomment the follow three lines if you have a Nvidia GPU but you do not want to enable it.#import os#os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"#os.environ["CUDA_VISIBLE_DEVICES"]=''fromcolor_sprayimportcolor_sprayrgb_image=color_spray('./a_gray_image.png','./an_rgb_image.png')DetailsThe training images are downloaded fromPEXEL.LicenseBSD
Package: colors-print
Colors-printDo you find it annoying when you have to search for a certain debug, or error, line in your console? Have you ever dreamed of a simple and quick way to make your debug print truly visible? Well here is your solution !cprint is a minimalist python library which gives you the possibility to print in color.InstallpipinstallColors-printUsageccprint加强版fromcprintimportccprintccprint('Hello Word')cprintfromcprintimportcprintcprint(arg)# WHITEcprint.ok(arg)# BLUEcprint.info(arg)# GREENcprint.warn(arg)# YELLOWcprint.err(arg,interrupt=False)# BROWNcprint.fatal(arg,interrupt=False)# RED
Package: colorspy
ColorsPyThis is a simple python package that can be used for adding colors in PyGame or just to see the RGB values of almost any color.Example Code:Basic use:fromcolorspyimport*print(red)print(blue)For PyGame:importcolorspyascolorsimportpygamepygame.init()win=pygame.display.set_mode((800,600))run=Truewhilerun:"""Rest of your code"""win.fill(colors.red)pygame.display.updateColor Conversion:fromcolorspyimport*converter=ColorConverter()"""If you want any other color's HEX value, you could just pass a tuple of the RGB values.The hash variable is a boolean that tells that if you want a hash sign in the HEX value."""hex_red=converter.rgb2hex(red,hash=True)"""This will return the RGB value of blue."""rgb_blue=converter.hex2rgb("0000ff")Color Pickerimportcolorspyascolorsmy_color=colors.color_picker()"""This will return a list of the RGB value and the HEX value of the color you select. There is also a argument hex_value which is a boolean. You can use that to decide that whether you want the HEX value or not."""v 0.1Added most basic colors.v 0.2Added support for RGB to HEX and HEX to RGB color conversion.Added a few more colors.v 0.2.1Fixed a minor bugv 0.3Added a whole lot more colors.Added a color picker to choose colors easily.v 0.4Fixed color values of some colors