Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Generates Gource config file from git submodules, starts Gource.
# Place to /usr/local/bin and run at the main repository root.
#
# (c) 2010 Mikael Lammentausta
# License is the same as Gource (GPLv3)
import os
import re
import UIKit
extension UIImage {
// colorize image with given tint color
// this is similar to Photoshop's "Color" layer blend mode
// this is perfect for non-greyscale source images, and images that have both highlights and shadows that should be preserved
// white will stay white and black will stay black as the lightness of the image is preserved
func tint(tintColor: UIColor) -> UIImage {