Skip to main content

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: ◼◼◼

Release files for pencils 0.1.0

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

Source distribution (sdist)

Source distribution for pencils 0.1.0
File Size Uploaded
pencils-0.1.0.tar.gz 15.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pencils 0.1.0
File Interpreter ABI Platform
pencils-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 31.3 kB

Release files / pencils-0.1.0.tar.gz

Download URL pencils-0.1.0.tar.gz
Size 15.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d76b3e0024b3f898a90f7c38b541d4a6fbaddae0b72a32a098e33d1c32b19333
BLAKE2b-256 checksum
How to use checksums
54e050f36a7131876c1c44367765b105816160789f1f4f3bf849e6fc554ec4ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.25.1

Release files / pencils-0.1.0-py3-none-any.whl

Download URL pencils-0.1.0-py3-none-any.whl
Size 16.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
77571782f838b66bbeaf9feaf68277ecafa39bd428b43f2d0604d09897070c20
BLAKE2b-256 checksum
How to use checksums
bf5c99fa2744951a3bcfb43b405a3020f55144b6e82510c6a133238467cb4ad3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.25.1

Release history Release notifications | RSS feed

This release

0.1.0 This release

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