Skip to main content

Sh🕶️des

About

Shades is a python module for generative 2d image creation.

The main abstract object is a 'shade' which will determine color based on rules, and contains methods for drawing on images.

The majority of these implement simplex noise fields to determine color resulting in images that will appear different each time they are generated.

Current existing shades are:

  • BlockColor
  • HorizontalGradient
  • VerticalGradient
  • PointGradients
  • NoiseGradient
  • DomainWarpGradient
  • SwirlOfShades

All shades have inherit internal methods that can be used for drawing on images.

Current existing methods are:

  • rectangle
  • triangle
  • shape
  • circle
  • pizza_slice
  • fill

Using Shades

Shades is designed to help make image creation easier. Here's an example:

# First shades is imported along with any required modules
import shades
import random

# The shades.Canvas() function will return a blank PIL image
canvas = shades.Canvas()

# A shade is defined like so the below creates a simplex noise gradent:
shade = shades.NoiseGradient(
    color = (200,200,200),
    noise_fields = [shades.NoiseField(scale=0.02) for i in range(3)],
    warp_size = 50
    warp_noise = (shades.NoiseField(scale=0.005),shades.NoiseField(scale=0.005))
)

# The below for loops draw a grid across the 'canvas' image
for x in range(-50, canvas.width+50, 10):
    shade.line(canvas, (x,-50), (x,canvas.height+50))

for y in range(-50, canvas.height+50, 10):
    shade.line(canvas, (-50,y), (canvas.height+50,y))

# Then normal PIL Image methods like "show" and "save" can be used on the image
canvas.show()
canvas.save('picture.png')

Installing Shades

Shades is pip installable with python -m pip install shades

Metadata

Release files for shades 0.1.2

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

Source distribution (sdist)

Source distribution for shades 0.1.2
File Size Uploaded Provenance Actions
shades-0.1.2.tar.gz 8.0 kB Without provenance Details for shades-0.1.2.tar.gz

Built distribution (wheel)

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

Total release size: 16.4 kB

Release files / shades-0.1.2.tar.gz

Download URL shades-0.1.2.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
9ef0cb1a36669c988a4001c770638ff9a919fe54cd167c029604f7640684730a
BLAKE2b-256 checksum
How to use checksums
9dd3c7b9e2f3850770242b053f89cad433f2567dde1160a9b713433f4b6d3587
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.6.9

Release files / shades-0.1.2-py3-none-any.whl

Download URL shades-0.1.2-py3-none-any.whl
Size 8.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a6b753fe9018536a9788bba7b9996c1152865f4085f76beab0c9ab2a7fe9d3f9
BLAKE2b-256 checksum
How to use checksums
b5b9089c929b1c01b2691dcafb7374fb08c62b9ed99a91c3bdb8c5c748533332
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.6.9

Security for shades 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files No provenance

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