# Path: pywal/util.py
# class Color:
#     def __init__(self, hex_color):
#     def __str__(self):
#     def rgb(self):
#     def xrgba(self):
#     def rgba(self):
#     def alpha(self):
#     def alpha_dec(self):
#     def decimal(self):
#     def decimal_strip(self):
#     def octal(self):
#     def octal_strip(self):
#     def strip(self):
#     def red(self):
#     def green(self):
#     def blue(self):
#     def lighten(self, percent):
#     def darken(self, percent):
#     def saturate(self, percent):
# def read_file(input_file):
# def read_file_json(input_file):
# def read_file_raw(input_file):
# def save_file(data, export_file):
# def save_file_json(data, export_file):
# def create_dir(directory):
# def setup_logging():
# def hex_to_rgb(color):
# def hex_to_xrgba(color):
# def rgb_to_hex(color):
# def darken_color(color, amount):
# def lighten_color(color, amount):
# def blend_color(color, color2):
# def saturate_color(color, amount):
# def rgb_to_yiq(color):
# def disown(cmd):
# def get_pid(name):


import unittest
import os
from pywal import util
        util.save_file("Hello, world", tmp_file)
        result = os.path.isfile(tmp_file)
        self.assertTrue(result)

    def test_save_file_json(self):
        """> Save colors to a file."""
        tmp_file = "/tmp/test_file.json"
        util.save_file_json(COLORS, tmp_file)
        result = os.path.isfile(tmp_file)
        self.assertTrue(result)

    def test_create_dir(self):
        """> Create a directory."""
        tmp_dir = "/tmp/test_dir"
        util.create_dir(tmp_dir)
        self.assertTrue(os.path.isdir(tmp_dir))
        os.rmdir(tmp_dir)

    def test_hex_to_rgb_black(self):
        """> Convert #000000 to RGB."""
        result = util.hex_to_rgb("#000000")
        self.assertEqual(result, (0, 0, 0))

    def test_hex_to_rgb_white(self):
        """> Convert #ffffff to RGB."""
        result = util.hex_to_rgb("#ffffff")
        self.assertEqual(result, (255, 255, 255))

    def test_hex_to_rgb_rand(self):
        """> Convert #98aec2 to RGB."""

# Path: pywal/util.py
# class Color:
#     def __init__(self, hex_color):
#     def __str__(self):
#     def rgb(self):
#     def xrgba(self):
#     def rgba(self):
#     def alpha(self):
#     def alpha_dec(self):
#     def decimal(self):
#     def decimal_strip(self):
#     def octal(self):
#     def octal_strip(self):
#     def strip(self):
#     def red(self):
#     def green(self):
#     def blue(self):
#     def lighten(self, percent):
#     def darken(self, percent):
#     def saturate(self, percent):
# def read_file(input_file):
# def read_file_json(input_file):
# def read_file_raw(input_file):
# def save_file(data, export_file):
# def save_file_json(data, export_file):
# def create_dir(directory):
# def setup_logging():
# def hex_to_rgb(color):
# def hex_to_xrgba(color):
# def rgb_to_hex(color):
# def darken_color(color, amount):
# def lighten_color(color, amount):
# def blend_color(color, color2):
# def saturate_color(color, amount):
# def rgb_to_yiq(color):
# def disown(cmd):
# def get_pid(name):


# Path: tests/test_util.py
import unittest
import os
from pywal import util

        util.save_file("Hello, world", tmp_file)
        result = os.path.isfile(tmp_file)
        self.assertTrue(result)

    def test_save_file_json(self):
        """> Save colors to a file."""
        tmp_file = "/tmp/test_file.json"
        util.save_file_json(COLORS, tmp_file)
        result = os.path.isfile(tmp_file)
        self.assertTrue(result)

    def test_create_dir(self):
        """> Create a directory."""
        tmp_dir = "/tmp/test_dir"
        util.create_dir(tmp_dir)
        self.assertTrue(os.path.isdir(tmp_dir))
        os.rmdir(tmp_dir)

    def test_hex_to_rgb_black(self):
        """> Convert #000000 to RGB."""
        result = util.hex_to_rgb("#000000")
        self.assertEqual(result, (0, 0, 0))

    def test_hex_to_rgb_white(self):
        """> Convert #ffffff to RGB."""
        result = util.hex_to_rgb("#ffffff")
        self.assertEqual(result, (255, 255, 255))

    def test_hex_to_rgb_rand(self):
        """> Convert #98aec2 to RGB."""

        result = util.hex_to_rgb("#98aec2")