Skip to content

Instantly share code, notes, and snippets.


Feras Alnatsheh falnatsheh

View GitHub Profile
falnatsheh / Photoshop Colorize
Created Oct 25, 2017 — forked from kdbdallas/Photoshop Colorize
What Photoshop's Colorize option in the Hue/Saturation adjustment window does
View Photoshop Colorize
The Colorize option changes the nature of the Hue/Saturation control.
When checked, it removes the color from an image and overlays the image with a tint of a single hue and saturation.
Each pixel's luminosity remains unchanged (actually, it is changed, but very little).
With the Colorize option, the Hue and Saturation values are no longer relative numbers based on an offset from a starting point.
Instead, they are absolute numbers.
The Hue value ranges from 0° to 360° and represents an absolute position on the color wheel (0° and 360° are the same color; red)
The Saturation value ranges from 0% to 100%.
If Saturation is changed to 0%, color will be negated and the pixels will go gray.
Using Hue/Saturation to colorize an image is not the same as making a duo tone.
View Simple Scrolling UIStackView with SnapKit
import UIKit
import SnapKit
class ViewController: UIViewController {
var scrollView: UIScrollView!
var stackView: UIStackView!
override func viewDidLoad() {
falnatsheh /
Created Mar 28, 2013
Simple script to hide or show the desktop icons in Mac OSX.
# Show or Hide desktop icons.
# Usage: desktop-icons [show | hide]
set -e
if [ -z $1 ]; then
echo Error: Please enter show or hide.