[1]:
%reload_ext autoreload
%autoreload 2

import numpy as np
import matplotlib.pyplot as plt
from PIL import Image, ImageOps
import excolor

Sigmoid wallpaper

[2]:
green, blue = "#CCFF66", "#2980BA"
img = excolor.sigmoid_wallpaper(colors=green, background=blue, n=3, midpoint=0.3)
img
[2]:
../_images/notebooks_wallpapers_2_0.png

Perlin wallpaper

[3]:
# [Optional] Load background image
url = "https://github.com/timpyrkov/excolor/blob/master/img/image_color.png?raw=true"
bg = excolor.load_image(url)
bg = excolor.greyscale_image(bg)

# Draw patches distorted by Perlin noise
img = excolor.perlin_wallpaper('rtd_r', n=5, background=bg, size=(1280, 960))
img
[3]:
../_images/notebooks_wallpapers_4_0.png

Perlin lines

[4]:
# [Optional] Load background image
url = "https://github.com/timpyrkov/excolor/blob/master/img/image_color.png?raw=true"
bg = excolor.load_image(url)
bg = excolor.greyscale_image(bg)

# Draw lines distorted by Perlin noise
img = excolor.perlin_lines('rtd_r', m=6, background=bg, size=(1280, 960))
img
[4]:
../_images/notebooks_wallpapers_6_0.png

Gradient wallpaper

[5]:
green, blue = "#CCFF66", "#2980BA"
img = excolor.gradient_wallpaper([green, blue], angle=-30)
img
[5]:
../_images/notebooks_wallpapers_8_0.png

Low-polygon wallpaper

[6]:
colors = excolor.get_colors('rtd', n=10)
img = excolor.triangle_wallpaper(colors, size=(1280, 720), distortion=0.5)
img
[6]:
../_images/notebooks_wallpapers_10_0.png
[ ]: