Skip to main content

Repattern

Unique deterministic procedural image and identicon generator, with all sorts of modifiers

Quick preview:

Identicons:

Normal
Gradient
Gradient + Base color
Rounded blocks
Padding
Options

Seed: Repattern-1.0

Options: (For the normal picture, just add the seed with no other modifiers)

Gradient: Identicon_Options(gradient=True)

Gradient + Base color: Identicon_Options(gradient=True, basecolor=(255,0,0))

Rounded blocks: Identicon_Options(gradient=True, basecolor=(255,0,0), round_blocks=True, block_radius=1000)

Padding: Identicon_Options(gradient=True, basecolor=(255,0,0), round_blocks=True, block_radius=1000, padding=100)

Backgrounds:

Delusional background:

Normal
Increased depth
Early internet effect
Cyber effect
Pixelated effect
Options

Seed: Repattern-1.0-delulu

Options: (For the normal picture, just add the seed with no other modifiers)

Increased depth: Delusional_Background_Options(depth=20)

Early internet effect: Delusional_Background_Options(early_internet_effect=True)

Cyber effect: Delusional_Background_Options(cybercore_effect=True)

Pixelated effect: Delusional_Background_Options(pixelated_effect=True, pixelated_strength=0.2)

Psychedelic background:

Normal
Force complex
Early internet effect
Cyber effect
Pixelated effect
Options

Seed: Repattern-1.0-psych

Options: (For the normal picture, just add the seed with no other modifiers)

Force complex: psychedelic_background_options(force_complex=True)

Early internet effect: psychedelic_background_options(early_internet_effect=True)

Cyber effect: psychedelic_background_options(cybercore_effect=True)

Pixelated effect: psychedelic_background_options(pixelated_effect=True, pixelated_strength=0.2)

Combined (Generated identicon on top of generated background):

Delusional background
Psychedelic background
Delusional Gradient
Psychedelic Gradient
Rounded
Blend alpha
Early internet effect
Cyber effect
Psychedelic Gradient
Pixelated effect

Quick start

pip install repattern
from repattern import Generate, Combined_Options

Gen = Generate(
    seed="Hi! I'm a unique seed, set me to None so I can randomize myself!",
    height=512,
    width=512,
    type="combined",
    combined_options=Combined_Options(
        # use_psychedelic_background=True,
        upscale_height=1024,
        upscale_width=1024,
        combined_cybercore_effect=True,
        combined_early_internet_effect=True,
    ),
)
Gen.save("repattern","PNG")


"""
Gen.returnBuffer("WEBP",thumb=True):
    {
        "buffer": io.BytesIO(),
        "type": "image/webp",
        "exif": {
            'seed': "Hi! I'm a unique seed, set me to None so I can randomize myself!",
            'type': 'combined',
            'combined_options': {
                'identicon_width': 512,
                'identicon_height': 512,
                'identicon_padding': 51,
                'upscale_width': 1024,
                'upscale_height': 1024,
                'combined_early_internet_effect': True,
                'combined_cybercore_effect': True
            }
        },
    }
"""

Usage

Importing

from repattern import (
    Generate,
    Identicon_Options,
    Delusional_Background_Options,
    Psychedelic_Background_Options,
    Combined_Options,
)

Generate

The generating class, pass a seed, width, height and a type. After passing a type you can use the corresponding class to change the generating options. E.g. combined_options=Combined_Options(upscale_height=1024,upscale_width=1024)

Gen = Generate(
    seed="your-seed", # Leave it as None to generate a randomized seed.
    width=512,
    height=512,
    type="combined",    # "identicon" | "delusional_background" | "psychedelic_background" | "combined"
    combined_options=Combined_Options()
)

Saving:

Gen.save("output.png")      # PNG
Gen.save("output.jpg")      # format inferred from extension
Gen.save("output", "WEBP")  # explicit format
Gen.save()                  # saves as {seed}_{type}.png

Getting a buffer (for web use, APIs, etc.):

result = Gen.returnBuffer(
    typee="WEBP",   # "WEBP" | "PNG" | "JPEG"
    thumb=True      # True = quality 50 | False = quality 100
)

# returns:
# {
#     "buffer": io.BytesIO(),
#     "type": "image/webp",
#     "exif": {
#         "seed": "your-seed", # Leave it as None to generate a randomized seed
#         "type": "combined",
#         "combined_options": { ... }  # only non-default options
#     }
# }

Saved images always embeds its seed and options as EXIF metadata, so any image can always be reproduced exactly.


If your IDE support suggestions then you can always hover on any typed class such as [Combined_Options(), Identicon_Options(), Psychedelic_Background_Options(), Delusional_Background_Options()]

to see all of the available options.

Identicon

Gen = Generate(
    seed="your-seed", # Leave it as None to generate a randomized seed
    width=512,
    height=512,
    type="identicon",
    identicon_options=Identicon_Options(

        blocks_amount=7,            # default: 7
        padding=50,                 # padding around the icon in pixels, default: 50

        mode="colored",             # "colored" | "monochrome" | "grayscale" | "pastel"
        basecolor=(255, 0, 0),      # force RGB foreground color, default: None (derived from seed)
        backgroundcolor=(0, 0, 0),  # default: black
        transparent=False,          # overrides backgroundcolor, default: False
        color_theme="warm",         # "warm" | "cool" | "forest" | "ocean" | "sunset" | None
        saturation_boost=2.0,       # only in "colored" mode, default: 2.0
        brightness_boost=1.0,       # only in "colored" mode, default: 1.0

        gradient=False,
        gradient_strength=1.0,      # default: 1.0

        round_blocks=False,
        block_radius=0.25,          # fraction of cell size, default: 0.25
        cell_variation=0,           # random size variation per block, 0.0–1.0

        pattern_mask="matrix",      # bit mask string controlling which cells can be filled
        use_alpha=True,
        seed=None,                  # override seed just for the identicon

        width=512,
        height=512,
        background_width=512,       # total output size including background
        background_height=512,
        upscale_width=1024,         # upscale after generation, default: None
        upscale_height=1024,
    )
)

Delusional Background

Gen = Generate(
    seed="your-seed", # Leave it as None to generate a randomized seed
    width=512,
    height=512,
    type="delusional_background",
    delusional_background_options=Delusional_Background_Options(
        depth=8,                    # complexity of the function tree, higher = more complex
        max_attempts=20,            # attempts to find a high-quality pattern, default: 20
        base_color=(100, 0, 200),   # tint the palette, default: None (random from seed)
        seed=None,
        width=512,
        height=512,
        upscale_width=1024,
        upscale_height=1024,
    )
)

Psychedelic Background

Gen = Generate(
    seed="your-seed", # Leave it as None to generate a randomized seed
    width=512,
    height=512,
    type="psychedelic_background",
    psychedelic_background_options=Psychedelic_Background_Options(
        depth=-4,           # negative = shallower start, default: -4
        force_complex=True, # avoids flat/simple outputs, default: False
        seed=None,
        width=512,
        height=512,
        upscale_width=1024,
        upscale_height=1024,
    )
)

Combined

Gen = Generate(
    seed="your-seed", # Leave it as None to generate a randomized seed
    width=512,
    height=512,
    type="combined",
    combined_options=Combined_Options(
        icon_seed=None,     # defaults to Generate seed
        back_seed=None,     # defaults to Generate seed

        use_psychedelic_background=False,   # use psychedelic instead of delusional

        blend_alpha=1.0,        # identicon opacity, 0.0–1.0
        blend_mode="normal",    # "normal" | "overlay" | "multiply" | "screen" | "soft_light"
        background_first=True,
        identicon_on_top=True,

        background_width=512,
        background_height=512,
        upscale_width=1024,
        upscale_height=1024,

        identicon_width=512,
        identicon_height=512,
        identicon_padding=51,
        identicon_blocks_amount=7,
        identicon_mode="colored",   # "colored" | "monochrome" | "grayscale" | "pastel"
        identicon_basecolor=None,
        identicon_backgroundcolor=(0, 0, 0),
        identicon_transparent=True, # default True in combined mode
        identicon_gradient=False,
        identicon_gradient_strength=1.0,
        identicon_color_theme=None,
        identicon_saturation_boost=2.0,
        identicon_brightness_boost=1.0,
        identicon_round_blocks=False,
        identicon_block_radius=0.25,
        identicon_cell_variation=0,
        identicon_pattern_mask="matrix",

        background_depth=8,
        background_base_color=None,
        background_max_attempts=20,

        psychedelic_background_depth=-4,
        psychedelic_background_force_complex=False,
    )
)

Effects

Three effects are available: Early Internet, Cybercore, and Pixelated.

Every type supports all three effects. In combined mode, you can apply them per layer or on the final composited output. Each effect has a _strength float (0.0–1.0) to control intensity.

Early Internet

# identicon
Identicon_Options(early_internet_effect=True, early_internet_strength=0.7)

# delusional background
Delusional_Background_Options(early_internet_effect=True, early_internet_strength=0.7)

# psychedelic background
Psychedelic_Background_Options(early_internet_effect=True, early_internet_strength=0.7)

# combined per layer
Combined_Options(
    identicon_early_internet_effect=True, identicon_early_internet_strength=0.7,
    background_early_internet_effect=True, background_early_internet_strength=0.7,
)

# combined on final output
Combined_Options(combined_early_internet_effect=True, combined_early_internet_strength=0.7)

Cybercore

# identicon
Identicon_Options(cybercore_effect=True, cybercore_strength=0.7)

# delusional background
Delusional_Background_Options(cybercore_effect=True, cybercore_strength=0.7)

# psychedelic background
Psychedelic_Background_Options(cybercore_effect=True, cybercore_strength=0.7)

# combined per layer
Combined_Options(
    identicon_cybercore_effect=True, identicon_cybercore_strength=0.7,
    background_cybercore_effect=True, background_cybercore_strength=0.7,
)

# combined on final output
Combined_Options(combined_cybercore_effect=True, combined_cybercore_strength=0.7)

Pixelated

# identicon
Identicon_Options(pixelated_effect=True, pixelated_strength=0.7)

# delusional background
Delusional_Background_Options(pixelated_effect=True, pixelated_strength=0.2)  # 0.2 = subtle

# psychedelic background
Psychedelic_Background_Options(pixelated_effect=True, pixelated_strength=0.7)

# combined per layer
Combined_Options(
    identicon_pixelated_effect=True, identicon_pixelated_strength=0.7,
    background_pixelated_effect=True, background_pixelated_strength=0.2,
)

# combined on final output
Combined_Options(combined_pixelated_effect=True, combined_pixelated_strength=0.7)

All three effects can be stacked on any layer in any combination.

Gen = Generate(
    seed="your-seed", # Leave it as None to generate a randomized seed
    type="combined",
    combined_options=Combined_Options(
        use_psychedelic_background=True,
        background_early_internet_effect=True,
        background_cybercore_effect=True,
        background_pixelated_effect=True,
        background_pixelated_strength=0.2,
        combined_early_internet_effect=True,
        combined_cybercore_effect=True,
    )
)

More examples

Full seed: c69e7a2d8099d4877cdf640a8042aca348f05205a9c97a9e01

Combined (delusional) Combined (No effects) Background
Combined (distorted) Combined (No effects) Background

Full seed: 2dc42bc3ede4265f41d863dece5118e1a82e5c8c69dedf9630

Combined (delusional) Combined (No effects) Background
Combined (distorted) Combined (No effects) Background

Full seed: 0b37b430e0b00142cbfdd818d0e9562d9d347544079040b804

Combined (delusional) Combined (No effects) Background
Combined (distorted) Combined (No effects) Background

Full seed: 600bd30349a981b924a07568e3bcd8e36a141dd048062f36e9

Combined (delusional) Combined (No effects) Background
Combined (distorted) Combined (No effects) Background

Full seed: 9811657cd6ebbfdf1f862df437538a5c2c873b23badfe9a177

Combined (delusional) Combined (No effects) Background
Combined (distorted) Combined (No effects) Background

Full seed: d8a4eff74fa978a5eb0aa44ecc66f4533950dc35178ad9e0de

Combined (delusional) Combined (No effects) Background
Combined (distorted) Combined (No effects) Background

Full seed: 6df6e8ea26e1f7396160d9fa01a63ddb64c96b18f71efce3b8

Combined (delusional) Combined (No effects) Background
Combined (distorted) Combined (No effects) Background

Full seed: 9cb376dace89ba8e4e23cd34b769e93abc18ef2a82822e8ddc

Combined (delusional) Combined (No effects) Background
Combined (distorted) Combined (No effects) Background

Full seed: d4bbe906621b3c41be15988878270c10d78a4d3167bee36a9c

Combined (delusional) Combined (No effects) Background
Combined (distorted) Combined (No effects) Background

Full seed: e22b2f16daa35354b47b72b3460b918f91ded5dd7ee2430ffd

Combined (delusional) Combined (No effects) Background
Combined (distorted) Combined (No effects) Background

Credits

repattern is made by @remohexa. and is released under GPLv3 license.

Notes

This's the first version of this project readme, expect some improvements later.

Metadata

Release files for repattern 1.0.4

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

Source distribution (sdist)

Source distribution for repattern 1.0.4
File Size Uploaded Provenance Actions
repattern-1.0.4.tar.gz 45.9 kB With provenance Details for repattern-1.0.4.tar.gz

Built distribution (wheel)

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

Total release size: 87.3 kB

Release files / repattern-1.0.4.tar.gz

Download URL repattern-1.0.4.tar.gz
Size 45.9 kB
Tags Source
SHA-256 checksum
How to use checksums
56ede27f5aaa339eda572a605db494905eece5566db115498b43f4a92ebdc56c
BLAKE2b-256 checksum
How to use checksums
1befd8917abf992f20848f16674cbcaf86291eea82418d4190364c03cb5dcb38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 22, 2026.

Transparency log

Release files / repattern-1.0.4-py3-none-any.whl

Download URL repattern-1.0.4-py3-none-any.whl
Size 41.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1c71e3f0361a5a32a07c12924a7bd4477ec7e4a40e2a7d502ceca5534a443748
BLAKE2b-256 checksum
How to use checksums
ce1b21ee2595473f749a81d26488c64e9c6a33e87443061301e4f2909b669040
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 22, 2026.

Transparency log

Security for repattern 1.0.4

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for repattern-1.0.4.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 22, 2026.

Transparency log

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.

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