B/Y Colors
A Python package for working with colors, providing an intuitive interface for color manipulation, transformation, and variant generation. Based palette is blue and yellow, which gives the name of the package.
Features
- Simple and intuitive color manipulation
- Support for RGB, RGBA, and HEX color formats
- Color brightness adjustment (relative and absolute)
- Opacity/transparency control
- Automatic dark and light variant generation
- Background color compositing for transparent colors
Installation
Install using pip:
pip install bycolors
Quick Start
from bycolors import colors as byc
# Basic color usage
blue = byc.blue
yellow = byc.yellow
# Color variants
dark_blue = blue.dark
light_yellow = yellow.light
# Custom brightness
custom_blue = blue.brightness(0.7) # 70% relative brightness
very_dark = blue.absolute_brightness(0.2) # 20% absolute brightness
# Transparency
semi_transparent = blue.opacity(0.5)
fully_transparent = blue.transparent
# Color format conversion
# here for illustration blue is a perfect blue (#0000FF)
rgb_values = blue.rgb # (0, 0, 1)
rgba_values = blue.rgba # (0, 0, 1, 1)
hex_value = blue.hex # "#0000FF"
# Custom background for transparent colors
blue_on_white = blue.opacity(0.5, background_color=(1, 1, 1)).rgb # (0.5, 0.5, 1)
Documentation
For detailed documentation, visit:
Contributing
Contributions are welcome! For any suggestions or issues:
- Open an issue to discuss the proposed changes
- Fork the repository
- Create a pull request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for bycolors 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bycolors-0.4.1.tar.gz | 11.9 kB | Without provenance | Details for bycolors-0.4.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bycolors-0.4.1-py3-none-any.whl | Python 3 | none | any | Details for bycolors-0.4.1-py3-none-any.whl |
Total release size: 25.5 kB
Release files / bycolors-0.4.1.tar.gz
| Download URL | bycolors-0.4.1.tar.gz |
|---|---|
| Size | 11.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ac8e79f0a4f91dff071d032048d41cacaf26183304d466d4f259d65a136cb186
|
|
BLAKE2b-256 checksum How to use checksums |
04fc25ce2bb84700f6a6df6fb307fe8d2533bad2530f62e4716a283df7781be7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.18
|
Release files / bycolors-0.4.1-py3-none-any.whl
| Download URL | bycolors-0.4.1-py3-none-any.whl |
|---|---|
| Size | 13.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1c1c6f04bc2dbc23f69da1a8b0d4707896fe019cdf69b9f4a0fe61143b461eeb
|
|
BLAKE2b-256 checksum How to use checksums |
836964617923d420176f38a96d8740f91ab989f7f89ab593c94f758cdb581358
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.18
|
Security for bycolors 0.4.1
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.