Skip to main content

Simple wrapper around matplotlib for render color scheme palette

The format of pictures for saving is the same as matplotlib

[!WARNING] The library is under deep development. But it will be very useful to get feedback.

Sample palette

Usage

Install package

pip install draw_palette

Copy the lua file of a defined color.

Example usage:

from draw_palette import utils, DrawPalette

# Use internal lua import function as dict of tuple (color_name, hex)
colors = utils.import_palette("./colors.lua")
# Sort colors by name
colors.sort(key=lambda x: x[0])

# Create palette object
palette = DrawPalette(colors)
# Render it
palette.render()
# Save to the file
palette.save_image(image_name='palette.png')

colors.lua

To render a palette, a color table must be fed to the input.

Example of lua file with scheme:

local M = {}

---@class Palette
---@type table
M.palette = {
  red = "#cc6666",
  -- color name = "# HEX RGB value",
}

return M.palette

Development

Make Python virtual envelope and enable it

python -m venv .venv
make init

Metadata

Release files for draw_palette 0.3

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

Source distribution (sdist)

Source distribution for draw_palette 0.3
File Size Uploaded
draw_palette-0.3.tar.gz 447.4 kB Details

Built distribution (wheel)

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

Total release size: 452.4 kB

Release files / draw_palette-0.3.tar.gz

Download URL draw_palette-0.3.tar.gz
Size 447.4 kB
Tags Source
SHA-256 checksum
How to use checksums
665f2ea44e8babd2587511d0f29727599ad2742462abe9f39b54dc1425d36d99
BLAKE2b-256 checksum
How to use checksums
c7161058d4dabd3f9584b45d8f05a1211f71534ed90bd47952c0f8f7a4dcbd67
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.6

Release files / draw_palette-0.3-py3-none-any.whl

Download URL draw_palette-0.3-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
07a6069417822fd699d43a4c66a0cacc431211d1ecd67d29d182780c971f9b54
BLAKE2b-256 checksum
How to use checksums
ac625f5acef69a9b3a7a912b81717603acd8ca1424abbbc454fdc3eb8b6ac31f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.6

Release history Release notifications | RSS feed

This release

0.3 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