GithubHelp home page GithubHelp logo

mylus1 / python Goto Github PK

View Code? Open in Web Editor NEW

This project forked from catppuccin/python

0.0 0.0 0.0 55 KB

๐Ÿ Soothing pastel theme for Python

Home Page: https://pypi.org/project/catppuccin/

License: MIT License

Python 100.00%

python's Introduction

Logo
Catppuccin for Python

Installation

Install with pip or your preferred dependency management tool.

pip install catppuccin

Usage

>>> from catppuccin import Flavour
>>> Flavour.latte().mauve.hex
'8839ef'
>>> Flavour.mocha().teal.rgb
(148, 226, 213)

Flavour is a dataclass, so you can inspect its fields to get access to the full set of colour names and values:

>>> from dataclasses import fields
>>> flavour = Flavour.frappe()
>>> for field in fields(flavour):
        colour = getattr(flavour, field.name)
        print(f"{field.name}: #{colour.hex}")
rosewater: #f2d5cf
flamingo: #eebebe
pink: #f4b8e4
...
base: #303446
mantle: #292c3c
crust: #232634

Pygments Styles

This package provides a Pygments style for each of the four Catppuccin flavours.

Install Catppuccin with the pygments feature to include the relevant dependencies:

pip install catppuccin[pygments]

The styles are registered as importlib entrypoints, which allows Pygments to find them by name:

>>> from pygments.styles import get_style_by_name
>>> get_style_by_name("catppuccin-frappe")
catppuccin.extras.pygments.FrappeStyle

The following style names are available:

  • catppuccin-latte
  • catppuccin-frappe
  • catppuccin-macchiato
  • catppuccin-mocha

They can also be accessed by directly importing them:

from catppuccin.extras.pygments import MacchiatoStyle

Contribution

If you are looking to contribute, please read through our CONTRIBUTING.md first!

Development

This project is maintained with Poetry. If you don't have Poetry yet, you can install it using the installation instructions.

Install the project's dependencies including extras:

poetry install -E pygments

Code Standards

Before committing changes, it is recommended to run the following tools to ensure consistency in the codebase.

isort .
black .
pylint catppuccin
mypy .
pytest --cov catppuccin

These tools are all installed as part of the dev dependency group with Poetry. You can use poetry shell to automatically put these tools in your path.

๐Ÿ’ Thanks to

ย 

Copyright ยฉ 2022-present Catppuccin Org

python's People

Contributors

backwardspy avatar sigmanificient avatar sgoudham 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.