Giter VIP home page Giter VIP logo

tailwind-palette's Introduction

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.

tailwind-palette's People

Contributors

noahyoungs avatar dostuffthatmatters avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.