mirror of
https://github.com/dylanaraps/pywal.git
synced 2025-01-23 06:18:35 +01:00
api: Update example.
This commit is contained in:
parent
b8d6049aa8
commit
8917eef29e
@ -1,10 +1,11 @@
|
|||||||
"""pywal api example."""
|
|
||||||
import pywal
|
import pywal
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
"""Main function."""
|
"""Main function."""
|
||||||
image = "/home/dylan/Pictures/Wallpapers/anVmEaA.jpg"
|
# Validate image and pick a random image if a
|
||||||
|
# directory is given below.
|
||||||
|
image = pywal.get_image("/home/dylan/Pictures/Wallpapers/")
|
||||||
|
|
||||||
# Return a dict with the palette.
|
# Return a dict with the palette.
|
||||||
colors = pywal.create_palette(image)
|
colors = pywal.create_palette(image)
|
||||||
|
Loading…
Reference in New Issue
Block a user