Skip to main content

A collection of color palettes.

Project description

pencils

Pancils is a Python library with a colletion of color palettes.

Currently available palettes:

Features:

  • A lot of colors from manually picked palettes.
  • 100% type safe.
  • Best integration with IDEs, autocomplete all the way down.
  • Includes multiple representations (HEX, RGB, HSL) for each color.
  • Zero-dependency.

Installatiion:

python3 -m pip install pencils

Usage

Get the hex representation of "Sunflower" color from Dutch Palette of Flat UI Colors:

import pencils

pencils.NLPalette.colors.sunflower.value.hex
# 'FFC312'

The color: ◼◼◼

That's a lot of attributes and each one of them has a meaning:

  1. NLPalette is an instance of the pencils.Palette class which holds information about palette name, author, source URL, and even emojis associated with the palette.
  2. colors attribute is an enum, a subclass of pencils.Colors.
  3. sunflower is the color ID.
  4. value is used to get the value of the enum. The value is an instance of pencils.Color class which contains operations on colors.
  5. hex is a lowercase hex representaion of the color without #.

Make the color darker:

color = pencils.NLPalette.colors.sunflower.value.hsl
color.lightness = .2
color.hex
# '664c00'

The color: ◼◼◼

Get random color from a random palette:

pencils.random_palette().random_color()
# Color(name='Unmellow Yellow', hex='fffa65')

The color: ◼◼◼

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pencils-0.1.0.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

pencils-0.1.0-py3-none-any.whl (16.0 kB view details)

Uploaded Python 3

File details

Details for the file pencils-0.1.0.tar.gz.

File metadata

  • Download URL: pencils-0.1.0.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.25.1

File hashes

Hashes for pencils-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d76b3e0024b3f898a90f7c38b541d4a6fbaddae0b72a32a098e33d1c32b19333
MD5 4314ed84e2b85b0e1fba23477ee7a92c
BLAKE2b-256 54e050f36a7131876c1c44367765b105816160789f1f4f3bf849e6fc554ec4ed

See more details on using hashes here.

Provenance

File details

Details for the file pencils-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pencils-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.25.1

File hashes

Hashes for pencils-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 77571782f838b66bbeaf9feaf68277ecafa39bd428b43f2d0604d09897070c20
MD5 cf2a9f4ba5a03ef093c8ffd3ade74b17
BLAKE2b-256 bf5c99fa2744951a3bcfb43b405a3020f55144b6e82510c6a133238467cb4ad3

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page