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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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