forked from bennyguitar/Colours
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathColours.h
156 lines (134 loc) · 10.2 KB
/
Colours.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
//
// Colours.h
// ColoursDemo
//
// Created by Ben Gordon on 3/17/13.
// Copyright (c) 2013 Ben Gordon. All rights reserved.
//
#import <Foundation/Foundation.h>
// System Colors
#define ColorInfoBlue [UIColor colorWithRed:47/255.0f green:112/255.0f blue:225/255.0f alpha:1.0]
#define ColorSuccess [UIColor colorWithRed:25/255.0f green:188/255.0f blue:63/255.0f alpha:1.0]
#define ColorWarning [UIColor colorWithRed:221/255.0f green:170/255.0f blue:59/255.0f alpha:1.0]
#define ColorDanger [UIColor colorWithRed:229/255.0f green:0/255.0f blue:15/255.0f alpha:1.0]
// Whites
#define ColorAntiqueWhite [UIColor colorWithRed:250/255.0f green:235/255.0f blue:215/255.0f alpha:1.0]
#define ColorOldLace [UIColor colorWithRed:253/255.0f green:245/255.0f blue:230/255.0f alpha:1.0]
#define ColorIvory [UIColor colorWithRed:255/255.0f green:255/255.0f blue:240/255.0f alpha:1.0]
#define ColorSeashell [UIColor colorWithRed:255/255.0f green:245/255.0f blue:238/255.0f alpha:1.0]
#define ColorGhostWhite [UIColor colorWithRed:248/255.0f green:248/255.0f blue:255/255.0f alpha:1.0]
#define ColorSnow [UIColor colorWithRed:255/255.0f green:250/255.0f blue:250/255.0f alpha:1.0]
#define ColorLinen [UIColor colorWithRed:250/255.0f green:240/255.0f blue:230/255.0f alpha:1.0]
// Grays
#define Color25PercentBlack [UIColor colorWithWhite:0.25 alpha:1.0]
#define Color50PercentBlack [UIColor colorWithWhite:0.5 alpha:1.0]
#define Color75PercentBlack [UIColor colorWithWhite:0.75 alpha:1.0]
#define ColorWarmGray [UIColor colorWithRed:133/255.0f green:117/255.0f blue:112/255.0f alpha:1.0]
#define ColorCoolGray [UIColor colorWithRed:118/255.0f green:122/255.0f blue:133/255.0f alpha:1.0]
#define ColorCharcoal [UIColor colorWithRed:34/255.0f green:34/255.0f blue:34/255.0f alpha:1.0]
// Blues
#define ColorTeal [UIColor colorWithRed:28/255.0f green:160/255.0f blue:170/255.0f alpha:1.0]
#define ColorSteelBlue [UIColor colorWithRed:103/255.0f green:153/255.0f blue:170/255.0f alpha:1.0]
#define ColorRobinEgg [UIColor colorWithRed:141/255.0f green:218/255.0f blue:247/255.0f alpha:1.0]
#define ColorPastelBlue [UIColor colorWithRed:99/255.0f green:161/255.0f blue:247/255.0f alpha:1.0]
#define ColorTurquoise [UIColor colorWithRed:112/255.0f green:219/255.0f blue:219/255.0f alpha:1.0]
#define ColorSkyBlue [UIColor colorWithRed:0/255.0f green:178/255.0f blue:238/255.0f alpha:1.0]
#define ColorIndigo [UIColor colorWithRed:13/255.0f green:79/255.0f blue:139/255.0f alpha:1.0]
#define ColorDenim [UIColor colorWithRed:67/255.0f green:114/255.0f blue:170/255.0f alpha:1.0]
#define ColorBlueberry [UIColor colorWithRed:89/255.0f green:113/255.0f blue:173/255.0f alpha:1.0]
#define ColorCornflower [UIColor colorWithRed:100/255.0f green:149/255.0f blue:237/255.0f alpha:1.0]
#define ColorBabyBlue [UIColor colorWithRed:190/255.0f green:220/255.0f blue:230/255.0f alpha:1.0]
#define ColorMidnightBlue [UIColor colorWithRed:13/255.0f green:26/255.0f blue:35/255.0f alpha:1.0]
#define ColorFadedBlue [UIColor colorWithRed:23/255.0f green:137/255.0f blue:155/255.0f alpha:1.0]
#define ColorIceberg [UIColor colorWithRed:200/255.0f green:213/255.0f blue:219/255.0f alpha:1.0]
#define ColorWave [UIColor colorWithRed:102/255.0f green:169/255.0f blue:251/255.0f alpha:1.0]
// Greens
#define ColorEmerald [UIColor colorWithRed:1/255.0f green:152/255.0f blue:117/255.0f alpha:1.0]
#define ColorGrass [UIColor colorWithRed:99/255.0f green:214/255.0f blue:74/255.0f alpha:1.0]
#define ColorPastelGreen [UIColor colorWithRed:126/255.0f green:242/255.0f blue:124/255.0f alpha:1.0]
#define ColorSeafoam [UIColor colorWithRed:77/255.0f green:226/255.0f blue:140/255.0f alpha:1.0]
#define ColorPaleGreen [UIColor colorWithRed:176/255.0f green:226/255.0f blue:172/255.0f alpha:1.0]
#define ColorCactusGreen [UIColor colorWithRed:99/255.0f green:111/255.0f blue:87/255.0f alpha:1.0]
#define ColorChartreuse [UIColor colorWithRed:69/255.0f green:139/255.0f blue:0/255.0f alpha:1.0]
#define ColorHollyGreen [UIColor colorWithRed:32/255.0f green:87/255.0f blue:14/255.0f alpha:1.0]
#define ColorOlive [UIColor colorWithRed:91/255.0f green:114/255.0f blue:34/255.0f alpha:1.0]
#define ColorOliveDrab [UIColor colorWithRed:107/255.0f green:142/255.0f blue:35/255.0f alpha:1.0]
#define ColorMoneyGreen [UIColor colorWithRed:134/255.0f green:198/255.0f blue:124/255.0f alpha:1.0]
#define ColorHoneydew [UIColor colorWithRed:216/255.0f green:255/255.0f blue:231/255.0f alpha:1.0]
#define ColorLime [UIColor colorWithRed:56/255.0f green:237/255.0f blue:56/255.0f alpha:1.0]
#define ColorCardTable [UIColor colorWithRed:87/255.0f green:121/255.0f blue:107/255.0f alpha:1.0]
// Reds
#define ColorSalmon [UIColor colorWithRed:233/255.0f green:87/255.0f blue:95/255.0f alpha:1.0]
#define ColorBrickRed [UIColor colorWithRed:151/255.0f green:27/255.0f blue:16/255.0f alpha:1.0]
#define ColorEasterPink [UIColor colorWithRed:241/255.0f green:167/255.0f blue:162/255.0f alpha:1.0]
#define ColorGrapefruit [UIColor colorWithRed:228/255.0f green:31/255.0f blue:54/255.0f alpha:1.0]
#define ColorPink [UIColor colorWithRed:255/255.0f green:95/255.0f blue:154/255.0f alpha:1.0]
#define ColorIndianRed [UIColor colorWithRed:205/255.0f green:92/255.0f blue:92/255.0f alpha:1.0]
#define ColorStrawberry [UIColor colorWithRed:190/255.0f green:38/255.0f blue:37/255.0f alpha:1.0]
#define ColorCoral [UIColor colorWithRed:240/255.0f green:128/255.0f blue:128/255.0f alpha:1.0]
#define ColorMaroon [UIColor colorWithRed:80/255.0f green:4/255.0f blue:28/255.0f alpha:1.0]
#define ColorWatermelon [UIColor colorWithRed:242/255.0f green:71/255.0f blue:63/255.0f alpha:1.0]
#define ColorTomato [UIColor colorWithRed:255/255.0f green:99/255.0f blue:71/255.0f alpha:1.0]
#define ColorPinkLipstick [UIColor colorWithRed:255/255.0f green:105/255.0f blue:180/255.0f alpha:1.0]
#define ColorPaleRose [UIColor colorWithRed:255/255.0f green:228/255.0f blue:225/255.0f alpha:1.0]
#define ColorCrimson [UIColor colorWithRed:187/255.0f green:18/255.0f blue:36/255.0f alpha:1.0]
// Purples
#define ColorEggplant [UIColor colorWithRed:105/255.0f green:5/255.0f blue:98/255.0f alpha:1.0]
#define ColorPastelPurple [UIColor colorWithRed:207/255.0f green:100/255.0f blue:235/255.0f alpha:1.0]
#define ColorPalePurple [UIColor colorWithRed:229/255.0f green:180/255.0f blue:235/255.0f alpha:1.0]
#define ColorCoolPurple [UIColor colorWithRed:140/255.0f green:93/255.0f blue:228/255.0f alpha:1.0]
#define ColorViolet [UIColor colorWithRed:191/255.0f green:95/255.0f blue:255/255.0f alpha:1.0]
#define ColorPlum [UIColor colorWithRed:139/255.0f green:102/255.0f blue:139/255.0f alpha:1.0]
#define ColorLavender [UIColor colorWithRed:204/255.0f green:153/255.0f blue:204/255.0f alpha:1.0]
#define ColorRaspberry [UIColor colorWithRed:135/255.0f green:38/255.0f blue:87/255.0f alpha:1.0]
#define ColorFuschia [UIColor colorWithRed:255/255.0f green:20/255.0f blue:147/255.0f alpha:1.0]
#define ColorGrape [UIColor colorWithRed:54/255.0f green:11/255.0f blue:88/255.0f alpha:1.0]
#define ColorPeriwinkle [UIColor colorWithRed:135/255.0f green:159/255.0f blue:237/255.0f alpha:1.0]
#define ColorOrchid [UIColor colorWithRed:218/255.0f green:112/255.0f blue:214/255.0f alpha:1.0]
// Yellows
#define ColorGoldenrod [UIColor colorWithRed:215/255.0f green:170/255.0f blue:51/255.0f alpha:1.0]
#define ColorYellowGreen [UIColor colorWithRed:192/255.0f green:242/255.0f blue:39/255.0f alpha:1.0]
#define ColorBanana [UIColor colorWithRed:229/255.0f green:227/255.0f blue:58/255.0f alpha:1.0]
#define ColorMustard [UIColor colorWithRed:205/255.0f green:171/255.0f blue:45/255.0f alpha:1.0]
#define ColorButtermilk [UIColor colorWithRed:254/255.0f green:241/255.0f blue:181/255.0f alpha:1.0]
#define ColorGold [UIColor colorWithRed:139/255.0f green:117/255.0f blue:18/255.0f alpha:1.0]
#define ColorCream [UIColor colorWithRed:240/255.0f green:226/255.0f blue:187/255.0f alpha:1.0]
#define ColorLightCream [UIColor colorWithRed:240/255.0f green:238/255.0f blue:215/255.0f alpha:1.0]
#define ColorWheat [UIColor colorWithRed:240/255.0f green:238/255.0f blue:215/255.0f alpha:1.0]
#define ColorBeige [UIColor colorWithRed:245/255.0f green:245/255.0f blue:220/255.0f alpha:1.0]
// Oranges
#define ColorPeach [UIColor colorWithRed:242/255.0f green:187/255.0f blue:97/255.0f alpha:1.0]
#define ColorBurntOrange [UIColor colorWithRed:184/255.0f green:102/255.0f blue:37/255.0f alpha:1.0]
#define ColorPastelOrange [UIColor colorWithRed:248/255.0f green:197/255.0f blue:143/255.0f alpha:1.0]
#define ColorCantaloupe [UIColor colorWithRed:250/255.0f green:154/255.0f blue:79/255.0f alpha:1.0]
#define ColorCarrot [UIColor colorWithRed:237/255.0f green:145/255.0f blue:33/255.0f alpha:1.0]
#define ColorMandarin [UIColor colorWithRed:247/255.0f green:145/255.0f blue:55/255.0f alpha:1.0]
// Browns
#define ColorChiliPowder [UIColor colorWithRed:199/255.0f green:63/255.0f blue:23/255.0f alpha:1.0]
#define ColorBurntSienna [UIColor colorWithRed:138/255.0f green:54/255.0f blue:15/255.0f alpha:1.0]
#define ColorChocolate [UIColor colorWithRed:94/255.0f green:38/255.0f blue:5/255.0f alpha:1.0]
#define ColorCoffee [UIColor colorWithRed:141/255.0f green:60/255.0f blue:15/255.0f alpha:1.0]
#define ColorCinnamon [UIColor colorWithRed:123/255.0f green:63/255.0f blue:9/255.0f alpha:1.0]
#define ColorAlmond [UIColor colorWithRed:196/255.0f green:142/255.0f blue:72/255.0f alpha:1.0]
#define ColorEggshell [UIColor colorWithRed:252/255.0f green:230/255.0f blue:201/255.0f alpha:1.0]
#define ColorCoffee [UIColor colorWithRed:141/255.0f green:60/255.0f blue:15/255.0f alpha:1.0]
#define ColorSand [UIColor colorWithRed:222/255.0f green:182/255.0f blue:151/255.0f alpha:1.0]
#define ColorMud [UIColor colorWithRed:70/255.0f green:45/255.0f blue:29/255.0f alpha:1.0]
#define ColorSienna [UIColor colorWithRed:160/255.0f green:82/255.0f blue:45/255.0f alpha:1.0]
#define ColorDust [UIColor colorWithRed:236/255.0f green:214/255.0f blue:197/255.0f alpha:1.0]
// Color Scheme Creation Enum
typedef enum {
ColorSchemeAnalagous = 0,
ColorSchemeMonochromatic,
ColorSchemeTriad,
ColorSchemeComplementary
}ColorScheme;
@interface Colours : NSObject
// Color Methods
+(UIColor *)colorFromHex:(NSString *)hexString;
+(NSString *)hexFromColor:(UIColor *)color;
+(NSArray *)rgbaArrayFromColor:(UIColor *)color;
+(NSArray *)hsbaArrayFromColor:(UIColor *)color;
// Generate Color Scheme
+(NSArray *)generateColorSchemeFromColor:(UIColor *)color ofType:(ColorScheme)type;
@end