hexsticker
Produce hexagon stickers automatically from an image in compliance with the Stickers Standard.
Installation
$ pip install hexsticker
After the installation step listed above, you will be able to use the hexsticker command:
$ hexsticker --help
Arch Linux
There is an AUR package available here: https://aur.archlinux.org/packages/hexsticker
For example with yay you can install it like this:
$ yay -S hexsticker
Requirements
Python 3.6+
Examples
Let’s create a hexagon sticker for the Selinon project.
Here is the input image:
Let’s create a hexagon sticker:
$ hexsticker selinon.png -o selinon-sticker-1.png
INFO:hexsticker.create:Writing output to 'selinon-sticker-1.png'
The resulting image is:
As can be seen above, there are some parts cut off - let’s add some padding to the image:
$ hexsticker input/selinon.png -o output/selinon-sticker-2.png --padding-size 25
INFO:hexsticker.create:Writing output to 'selinon-sticker-2.png'
The padded part is white by default - that’s why there are missing spikes of hexagon. Let’s set color of padded area to the same color as background color of the original image:
$ hexsticker input/selinon.png -o output/selinon-sticker-3.png --padding-size 25 --padding-color '#66cfa7'
INFO:hexsticker.create:Writing output to 'selinon-sticker-3.png'
Nice! What we could do next? Let’s try to add a hexagon border:
$ hexsticker input/selinon.png -o output/selinon-sticker-4.png --padding-size 25 --padding-color '#66cfa7' --border-size 35
INFO:hexsticker.create:Writing output to 'selinon-sticker-4.png'
Ehm, the default black one does not look that good in this case. Let’s try some color that fits color scheme:
$ hexsticker input/selinon.png -o output/selinon-sticker-5.png --padding-size 25 --padding-color '#66cfa7' --border-size 35 --border-color '#197a9f'
INFO:hexsticker.create:Writing output to 'selinon-sticker-5.png'
Note that the edges of the hexagon look a little jagged. You can add --supersample 2 to the previous command to remedy this. The number given sets the scale factor to use. Greater values result in a smoother result, at the expense of higher memory usage. This effect has diminishing returns; usually a value of 2 is enough for a nice result and going higher than 4 does not make much noticeable improvement.
As you can see, this tool can automate creation of hexagon stickers so they respect the hexagon standard. Feel free to additionally adjust the resulting image of your logo or the input image.
This tool supports only raster graphics.
Running from repo
To run hexsticker from repository run the following commands:
$ git clone https://github.com/fridex/hexsticker # or use ssh
$ cd hexsticker
$ pip3 install -r requirements.txt --user
$ export PYTHONPATH='.'
$ ./hexsticker-cli --help
Metadata
Release files for hexsticker 1.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hexsticker-1.2.1.tar.gz | 13.8 kB | Without provenance | Details for hexsticker-1.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hexsticker-1.2.1-py3-none-any.whl | Python 3 | none | any | Details for hexsticker-1.2.1-py3-none-any.whl |
Total release size: 28.2 kB
Release files / hexsticker-1.2.1.tar.gz
| Download URL | hexsticker-1.2.1.tar.gz |
|---|---|
| Size | 13.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cacd4aa38058aaedf9922d3d1c2ba648213212aa86459a92b0d45acad0d6410e
|
|
BLAKE2b-256 checksum How to use checksums |
ee46751aacedb0d955f715cc0473026428a8fd121fe2ba52676c096607c25596
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.9
|
Release files / hexsticker-1.2.1-py3-none-any.whl
| Download URL | hexsticker-1.2.1-py3-none-any.whl |
|---|---|
| Size | 14.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
08e4d0ae522bf185ece5d8cb58dcd56d5bee1ed88b910688bf8a68be0c6c959e
|
|
BLAKE2b-256 checksum How to use checksums |
7f16d2e1f8e598cfe90d19bc5da3b9a04dd1a2e1124425c3a547686ff2f94263
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.9
|
Security for hexsticker 1.2.1
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.