Skip to main content

Python Tailwind Palette

Introduction

Tailwind Palette is a Python package designed for working with the Tailwind CSS color palette. This library facilitates easy access and manipulation of Tailwind CSS colors in Python. It's an extension of the python-tailwind-colors library, originally developed by dostuffthatmatters, enhanced to provide additional functionality and improved user experience.

View the Tailwind CSS color palette here

Installation

To install Tailwind Palette, run:

pip install tailwind-palette

Usage

Import Statement

Use the following import statement to access the TailwindPalette class.

from tailwind_palette import TailwindPalette as tp

Accessing Colors

You can access color shades directly or use the '.get()' method.

Direct Access:

slate_100 = tp.SLATE.shade_100
print(f"Slate 100 Hex: {slate_100.hex}, RGB: {slate_100.rgb}")

Using '.get()' Method:

pink_500 = tp.get("pink-500")
print(f"Pink 500 Hex: {pink_500.hex}, RGB: {pink_500.rgb}")

Overriding Colors

You can override color shades using hex or RGB values.

Using Hex Value:

tp.SLATE.override_shade('shade_100', value="#abcdef")

Using RGB Value:

tp.SLATE.override_shade('shade_200', value=(12, 34, 56))

Features

  • Easy access to all Tailwind CSS color shades.
  • Ability to override specific color shades.
  • Hex and RGB color format support.

Dependencies

Tailwind Palette requires the following dependencies:

  • Python 3.x

Troubleshooting

If you encounter any issues, please refer to the GitHub Issues page for common problems and solutions.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Metadata

Release files for tailwind-palette 1.0.5

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

Source distribution (sdist)

Source distribution for tailwind-palette 1.0.5
File Size Uploaded
tailwind-palette-1.0.5.tar.gz 8.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tailwind-palette 1.0.5
File Interpreter ABI Platform
tailwind_palette-1.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 17.3 kB

Release files / tailwind-palette-1.0.5.tar.gz

Download URL tailwind-palette-1.0.5.tar.gz
Size 8.8 kB
Tags Source
SHA-256 checksum
How to use checksums
55939a176ff3dab6412d92cfdf76b2983829d9b95b11477806527d7d3be55d65
BLAKE2b-256 checksum
How to use checksums
53ec67252fb75f4eacc613521282947bad576bd98179723de189863572c63c8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.18

Release files / tailwind_palette-1.0.5-py3-none-any.whl

Download URL tailwind_palette-1.0.5-py3-none-any.whl
Size 8.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4f35a68734986ae78752942fe39b6cc197670f0f9c00b192fb95f53a92355e96
BLAKE2b-256 checksum
How to use checksums
c5143f050136d488fd57a2f24a53d16a410645e5adf4ee4a7147e2de590651da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.18

Release history Release notifications | RSS feed

This release

1.0.5 This release

2 release files

1.0.4

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

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