Skip to content

Instantly share code, notes, and snippets.

View cdes's full-sized avatar
💀
Crunching

Ahmad Al Haddad cdes

💀
Crunching
View GitHub Profile
@cdes
cdes / Luminosity Formulas
Created December 26, 2019 06:23
A collection of formulas to calculate a color luminosity from rgb
Luminance (relative)
0.2126 * R + 0.7152 * G + 0.0722 * B
http://www.w3.org/TR/AERT#color-contrast
0.299 * R + 0.587 * G + 0.114 * B
HSP Color Model
sqrt(0.299 * R^2 + 0.587 * G^2 + 0.114 * B^2)
@cdes
cdes / women-faces.json
Last active December 1, 2018 00:58
women-faces.json
[{"type":"IMAGE","opacity":1,"visible":true,"blendMode":"NORMAL","image":{"hash":[227,1,4,30,214,23,24,73,149,69,241,55,13,123,116,40,250,19,244,57],"name":"female-98"},"imageThumbnail":{"hash":[227,1,4,30,214,23,24,73,149,69,241,55,13,123,116,40,250,19,244,57],"name":"female-98"},"imageScaleMode":"FILL","rotation":0,"scale":0.5},{"type":"IMAGE","opacity":1,"visible":true,"blendMode":"NORMAL","image":{"hash":[193,7,152,91,15,156,241,231,62,43,159,82,6,68,217,62,162,30,201,13],"name":"female-97"},"imageThumbnail":{"hash":[193,7,152,91,15,156,241,231,62,43,159,82,6,68,217,62,162,30,201,13],"name":"female-97"},"imageScaleMode":"FILL","rotation":0,"scale":0.5},{"type":"IMAGE","opacity":1,"visible":true,"blendMode":"NORMAL","image":{"hash":[44,204,126,190,60,10,234,210,253,62,195,142,193,228,209,202,95,126,171,160],"name":"female-64"},"imageThumbnail":{"hash":[44,204,126,190,60,10,234,210,253,62,195,142,193,228,209,202,95,126,171,160],"name":"female-64"},"imageScaleMode":"FILL","rotation":0,"scale":0.5},{"type":"I
[{"type":"IMAGE","opacity":1,"visible":true,"blendMode":"NORMAL","image":{"hash":[145,236,171,173,175,56,109,34,223,168,114,163,43,23,53,29,220,7,142,8],"name":"anders"},"imageThumbnail":{"hash":[214,171,14,167,174,246,196,84,190,128,91,28,224,159,186,96,148,29,90,81],"name":"anders"},"imageScaleMode":"FILL","rotation":0,"scale":0.5},{"type":"IMAGE","opacity":1,"visible":true,"blendMode":"NORMAL","image":{"hash":[232,235,214,49,157,45,3,211,43,188,87,253,187,36,117,216,231,186,125,149],"name":"male-47"},"imageThumbnail":{"hash":[232,235,214,49,157,45,3,211,43,188,87,253,187,36,117,216,231,186,125,149],"name":"male-47"},"imageScaleMode":"FILL","rotation":0,"scale":0.5},{"type":"IMAGE","opacity":1,"visible":true,"blendMode":"NORMAL","image":{"hash":[213,167,106,14,158,119,30,68,76,1,113,126,80,182,94,102,112,64,51,10],"name":"17"},"imageThumbnail":{"hash":[213,167,106,14,158,119,30,68,76,1,113,126,80,182,94,102,112,64,51,10],"name":"17"},"imageScaleMode":"FILL","rotation":0,"scale":0.5},{"type":"IMAGE","opacity
@cdes
cdes / DAX_MultiObjectsRenamer.cs
Last active January 20, 2017 10:21
Improved version of Multi Objects Renamer http://u3d.as/jAp
// DAzBjax (2015), if you have same questions contact me at [email protected]
using UnityEngine;
using System.Collections;
using UnityEditor;
using System.IO;
using System.Reflection;
[ExecuteInEditMode]
public class DAX_MultiObjectsRenamer : EditorWindow
@cdes
cdes / gist:cc6605f390915b1c8e21f8030692786e
Created September 27, 2016 04:41
<Text> is updating inside <Image>
class App extends React.Component {
constructor(props) {
super(props);
this.state = {
myValue: 1
};
}