Skip to main content

TwitterFacebookInstagramYouTubeWhatsAppWWWPinterestE-Mail


cmatcher

Use the package to determine the best background and foreground color combinations (e.g. for web page design)

Screenshot of Test


Just download use

pip install cmatcher

Here is the code I used to print the stuff on the screenshot

This is basically everything you need to know

from cmatcher import CMatcher

cormatcher = CMatcher() #create an instance, first time takes longer because a color dataframe will be created and saved to HDD

for x in range(100):

    luminancedifference_from_best_result = choice(range(80,99)) #the higher the number, the less results (more contrast), max is 99

    hsv_difference_from_best_result = choice(range(80,99)) #the higher the number, the less results (more contrast), max is 99

    print(f'{x}. Test - Lum: {luminancedifference_from_best_result} - hsv: {hsv_difference_from_best_result}')

    cormatcher.get_best_contrast_colors(

        color=(choice(range(256)), choice(range(256)), choice(range(256))),

        lum_dif=luminancedifference_from_best_result,

        hsv_dif=hsv_difference_from_best_result,

    ) #this is the most important method, it finds all good combinations

    cormatcher.print_results() #a method to see all results in color

    print(cormatcher.results) #the results are saved in this list

    print('----------------------------------------------------------------------------')

Metadata

Release files for cmatcher 0.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cmatcher 0.11
File Size Uploaded Provenance Actions
cmatcher-0.11.tar.gz 27.2 kB Without provenance Details for cmatcher-0.11.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cmatcher 0.11
File Interpreter ABI Platform Actions
cmatcher-0.11-py3-none-any.whl Python 3 none any Details for cmatcher-0.11-py3-none-any.whl

Total release size: 55.0 kB

Release files / cmatcher-0.11.tar.gz

Download URL cmatcher-0.11.tar.gz
Size 27.2 kB
Tags Source
SHA-256 checksum
How to use checksums
e9d66a3745288750f3863374a017bb00371b19cc64a4f193bf8515be3abaafa4
BLAKE2b-256 checksum
How to use checksums
ec9de41738997d1413691f22e218bfac0d553103917fdd7e6c058c0b596ce44b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / cmatcher-0.11-py3-none-any.whl

Download URL cmatcher-0.11-py3-none-any.whl
Size 27.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
151d6be9df1084e7e37bc968b033365545140f51c0ff0f3aea36a6d3ec6341c2
BLAKE2b-256 checksum
How to use checksums
a66a234d936f328f628537f101e0c0847211e4c4be9b31205a1db0102b2a7fe9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Security for cmatcher 0.11

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page