Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
Material
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitriy Stepanets
Material
Commits
973a8015
Commit
973a8015
authored
Sep 25, 2015
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated base theme
parent
56d71fc4
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
502 additions
and
417 deletions
+502
-417
MaterialKit.xcodeproj/project.pbxproj
+8
-0
Source/BasicCardView.swift
+10
-10
Source/CapturePreview.swift
+1
-1
Source/FabButton.swift
+2
-2
Source/FlatButton.swift
+3
-3
Source/ImageCardView.swift
+15
-15
Source/MaterialButton.swift
+2
-2
Source/MaterialCardView.swift
+3
-3
Source/MaterialTheme+Color.swift
+371
-0
Source/MaterialTheme+Font.swift
+27
-0
Source/MaterialTheme+View.swift
+5
-3
Source/MaterialTheme.swift
+3
-357
Source/MaterialView.swift
+21
-8
Source/NavigationBarView.swift
+19
-1
Source/RaisedButton.swift
+2
-2
Source/Roboto.swift
+5
-5
Source/SideNavigationViewController.swift
+3
-3
Source/TextView.swift
+2
-2
No files found.
MaterialKit.xcodeproj/project.pbxproj
View file @
973a8015
...
...
@@ -15,6 +15,8 @@
65B965871B8BEEC60055B139
/* SideNavigationViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
65B965861B8BEEC60055B139
/* SideNavigationViewController.swift */
;
};
65BDD1451BB5B8B8006F7F2B
/* MaterialTheme+View.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
65BDD1441BB5B8B8006F7F2B
/* MaterialTheme+View.swift */
;
settings
=
{
ASSET_TAGS
=
();
};
};
65BDD1471BB5B916006F7F2B
/* MaterialView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
65BDD1461BB5B916006F7F2B
/* MaterialView.swift */
;
settings
=
{
ASSET_TAGS
=
();
};
};
65BDD1491BB5DC98006F7F2B
/* MaterialTheme+Color.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
65BDD1481BB5DC98006F7F2B
/* MaterialTheme+Color.swift */
;
settings
=
{
ASSET_TAGS
=
();
};
};
65BDD14B1BB5DD02006F7F2B
/* MaterialTheme+Font.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
65BDD14A1BB5DD02006F7F2B
/* MaterialTheme+Font.swift */
;
settings
=
{
ASSET_TAGS
=
();
};
};
65DBE4201B9A9244000C804F
/* Roboto-Bold.ttf in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
65DBE41E1B9A9244000C804F
/* Roboto-Bold.ttf */
;
};
65DBE4211B9A9244000C804F
/* Roboto-Thin.ttf in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
65DBE41F1B9A9244000C804F
/* Roboto-Thin.ttf */
;
};
962F3E531BACA68C0004B8AD
/* NavigationBarView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
962F3E521BACA68C0004B8AD
/* NavigationBarView.swift */
;
};
...
...
@@ -68,6 +70,8 @@
65B965861B8BEEC60055B139
/* SideNavigationViewController.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
SideNavigationViewController.swift
;
sourceTree
=
"<group>"
;
};
65BDD1441BB5B8B8006F7F2B
/* MaterialTheme+View.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
"MaterialTheme+View.swift"
;
sourceTree
=
"<group>"
;
};
65BDD1461BB5B916006F7F2B
/* MaterialView.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MaterialView.swift
;
sourceTree
=
"<group>"
;
};
65BDD1481BB5DC98006F7F2B
/* MaterialTheme+Color.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
"MaterialTheme+Color.swift"
;
sourceTree
=
"<group>"
;
};
65BDD14A1BB5DD02006F7F2B
/* MaterialTheme+Font.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
"MaterialTheme+Font.swift"
;
sourceTree
=
"<group>"
;
};
65DBE41E1B9A9244000C804F
/* Roboto-Bold.ttf */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file
;
path
=
"Roboto-Bold.ttf"
;
sourceTree
=
"<group>"
;
};
65DBE41F1B9A9244000C804F
/* Roboto-Thin.ttf */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file
;
path
=
"Roboto-Thin.ttf"
;
sourceTree
=
"<group>"
;
};
962F3E521BACA68C0004B8AD
/* NavigationBarView.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
NavigationBarView.swift
;
sourceTree
=
"<group>"
;
};
...
...
@@ -228,6 +232,8 @@
children
=
(
96B57D4D1B90AF7D00DE7BBB
/* MaterialTheme.swift */
,
65BDD1441BB5B8B8006F7F2B
/* MaterialTheme+View.swift */
,
65BDD1481BB5DC98006F7F2B
/* MaterialTheme+Color.swift */
,
65BDD14A1BB5DD02006F7F2B
/* MaterialTheme+Font.swift */
,
);
name
=
Theme
;
sourceTree
=
"<group>"
;
...
...
@@ -394,10 +400,12 @@
9638326B1B88E5BF0015F710
/* FabButton.swift in Sources */
,
9A94D1091B8A3F5100F586A5
/* MaterialCardView.swift in Sources */
,
65B965871B8BEEC60055B139
/* SideNavigationViewController.swift in Sources */
,
65BDD14B1BB5DD02006F7F2B
/* MaterialTheme+Font.swift in Sources */
,
65BDD1451BB5B8B8006F7F2B
/* MaterialTheme+View.swift in Sources */
,
9638326C1B88E5BF0015F710
/* FlatButton.swift in Sources */
,
963832711B88E5BF0015F710
/* MaterialText.swift in Sources */
,
9638326A1B88E5BF0015F710
/* CapturePreview.swift in Sources */
,
65BDD1491BB5DC98006F7F2B
/* MaterialTheme+Color.swift in Sources */
,
9AAC38541B89559900FE6B2D
/* Roboto.swift in Sources */
,
65B9657E1B8A7C330055B139
/* MaterialButton.swift in Sources */
,
963832881B8908180015F710
/* Layout.swift in Sources */
,
...
...
Source/BasicCardView.swift
View file @
973a8015
...
...
@@ -226,18 +226,18 @@ public class BasicCardView : MaterialCardView, Comparable {
if
nil
==
titleLabelContainer
{
titleLabelContainer
=
UIView
()
titleLabelContainer
!.
translatesAutoresizingMaskIntoConstraints
=
false
titleLabelContainer
!.
backgroundColor
=
MaterialTheme
.
c
lear
.
color
titleLabelContainer
!.
backgroundColor
=
MaterialTheme
.
c
olor
.
clear
.
base
addSubview
(
titleLabelContainer
!
)
}
// text
titleLabelContainer
!.
addSubview
(
t
)
t
.
translatesAutoresizingMaskIntoConstraints
=
false
t
.
backgroundColor
=
MaterialTheme
.
c
lear
.
color
t
.
backgroundColor
=
MaterialTheme
.
c
olor
.
clear
.
base
t
.
font
=
Roboto
.
regular
t
.
numberOfLines
=
0
t
.
lineBreakMode
=
.
ByTruncatingTail
t
.
textColor
=
MaterialTheme
.
white
.
color
t
.
textColor
=
MaterialTheme
.
color
.
white
.
base
}
else
{
titleLabelContainer
?
.
removeFromSuperview
()
titleLabelContainer
=
nil
...
...
@@ -270,15 +270,15 @@ public class BasicCardView : MaterialCardView, Comparable {
if
nil
==
detailLabelContainer
{
detailLabelContainer
=
UIView
()
detailLabelContainer
!.
translatesAutoresizingMaskIntoConstraints
=
false
detailLabelContainer
!.
backgroundColor
=
MaterialTheme
.
c
lear
.
color
detailLabelContainer
!.
backgroundColor
=
MaterialTheme
.
c
olor
.
clear
.
base
addSubview
(
detailLabelContainer
!
)
}
// text
detailLabelContainer
!.
addSubview
(
l
)
l
.
translatesAutoresizingMaskIntoConstraints
=
false
l
.
textColor
=
MaterialTheme
.
white
.
color
l
.
backgroundColor
=
MaterialTheme
.
c
lear
.
color
l
.
textColor
=
MaterialTheme
.
color
.
white
.
base
l
.
backgroundColor
=
MaterialTheme
.
c
olor
.
clear
.
base
l
.
font
=
Roboto
.
light
l
.
numberOfLines
=
0
l
.
lineBreakMode
=
.
ByTruncatingTail
...
...
@@ -297,7 +297,7 @@ public class BasicCardView : MaterialCardView, Comparable {
didSet
{
if
let
d
=
divider
{
d
.
translatesAutoresizingMaskIntoConstraints
=
false
d
.
backgroundColor
=
MaterialTheme
.
blueGrey
.
darken1
d
.
backgroundColor
=
MaterialTheme
.
color
.
blueGrey
.
darken1
addSubview
(
d
)
}
else
{
divider
?
.
removeFromSuperview
()
...
...
@@ -322,7 +322,7 @@ public class BasicCardView : MaterialCardView, Comparable {
}
else
if
nil
==
buttonsContainer
{
buttonsContainer
=
UIView
()
buttonsContainer
!.
translatesAutoresizingMaskIntoConstraints
=
false
buttonsContainer
!.
backgroundColor
=
MaterialTheme
.
c
lear
.
color
buttonsContainer
!.
backgroundColor
=
MaterialTheme
.
c
olor
.
clear
.
base
addSubview
(
buttonsContainer
!
)
}
else
{
for
v
in
buttonsContainer
!.
subviews
{
...
...
@@ -344,7 +344,7 @@ public class BasicCardView : MaterialCardView, Comparable {
}
else
if
nil
==
buttonsContainer
{
buttonsContainer
=
UIView
()
buttonsContainer
!.
translatesAutoresizingMaskIntoConstraints
=
false
buttonsContainer
!.
backgroundColor
=
MaterialTheme
.
c
lear
.
color
buttonsContainer
!.
backgroundColor
=
MaterialTheme
.
c
olor
.
clear
.
base
addSubview
(
buttonsContainer
!
)
}
reloadView
()
...
...
@@ -504,7 +504,7 @@ public class BasicCardView : MaterialCardView, Comparable {
internal
override
func
prepareView
()
{
super
.
prepareView
()
prepareShadow
()
backgroundColor
=
MaterialTheme
.
blueGrey
.
color
backgroundColor
=
MaterialTheme
.
color
.
blueGrey
.
base
}
}
...
...
Source/CapturePreview.swift
View file @
973a8015
...
...
@@ -194,7 +194,7 @@ public class Preview: UIView {
//
private
func
viewWithColor
(
color
:
UIColor
)
->
UIView
{
let
view
:
UIView
=
UIView
(
frame
:
Preview
.
boxBounds
)
view
.
backgroundColor
=
MaterialTheme
.
c
lear
.
color
view
.
backgroundColor
=
MaterialTheme
.
c
olor
.
clear
.
base
view
.
layer
.
borderColor
=
color
.
CGColor
view
.
layer
.
borderWidth
=
5
view
.
hidden
=
true
...
...
Source/FabButton.swift
View file @
973a8015
...
...
@@ -24,8 +24,8 @@ public class FabButton : MaterialButton {
//
internal
override
func
prepareView
()
{
super
.
prepareView
()
setTitleColor
(
MaterialTheme
.
white
.
color
,
forState
:
.
Normal
)
backgroundColor
=
MaterialTheme
.
red
.
darken1
setTitleColor
(
MaterialTheme
.
color
.
white
.
base
,
forState
:
.
Normal
)
backgroundColor
=
MaterialTheme
.
color
.
red
.
darken1
contentEdgeInsets
=
UIEdgeInsetsMake
(
0
,
0
,
0
,
0
)
}
...
...
Source/FlatButton.swift
View file @
973a8015
...
...
@@ -25,9 +25,9 @@ public class FlatButton : MaterialButton {
internal
override
func
prepareView
()
{
super
.
prepareView
()
titleLabel
!.
font
=
Roboto
.
regular
setTitleColor
(
MaterialTheme
.
blueGrey
.
darken4
,
forState
:
.
Normal
)
pulseColor
=
MaterialTheme
.
blueGrey
.
lighten3
backgroundColor
=
MaterialTheme
.
c
lear
.
color
setTitleColor
(
MaterialTheme
.
color
.
blueGrey
.
darken4
,
forState
:
.
Normal
)
pulseColor
=
MaterialTheme
.
color
.
blueGrey
.
lighten3
backgroundColor
=
MaterialTheme
.
c
olor
.
clear
.
base
contentEdgeInsets
=
UIEdgeInsetsMake
(
MaterialTheme
.
buttonVerticalInset
,
MaterialTheme
.
buttonHorizontalInset
,
MaterialTheme
.
buttonVerticalInset
,
MaterialTheme
.
buttonHorizontalInset
)
}
...
...
Source/ImageCardView.swift
View file @
973a8015
...
...
@@ -282,7 +282,7 @@ public class ImageCardView : MaterialCardView, Comparable {
if
nil
==
imageViewContainer
{
imageViewContainer
=
UIView
()
imageViewContainer
!.
translatesAutoresizingMaskIntoConstraints
=
false
imageViewContainer
!.
backgroundColor
=
MaterialTheme
.
c
lear
.
color
imageViewContainer
!.
backgroundColor
=
MaterialTheme
.
c
olor
.
clear
.
base
addSubview
(
imageViewContainer
!
)
}
...
...
@@ -293,8 +293,8 @@ public class ImageCardView : MaterialCardView, Comparable {
t
.
userInteractionEnabled
=
false
t
.
clipsToBounds
=
true
if
nil
!=
titleLabel
{
titleLabelContainer
!.
backgroundColor
=
MaterialTheme
.
c
lear
.
color
titleLabel
!.
textColor
=
MaterialTheme
.
white
.
color
titleLabelContainer
!.
backgroundColor
=
MaterialTheme
.
c
olor
.
clear
.
base
titleLabel
!.
textColor
=
MaterialTheme
.
color
.
white
.
base
titleLabelContainer
!.
removeFromSuperview
()
imageViewContainer
!.
addSubview
(
titleLabelContainer
!
)
}
...
...
@@ -336,16 +336,16 @@ public class ImageCardView : MaterialCardView, Comparable {
// text
titleLabelContainer
!.
addSubview
(
t
)
t
.
translatesAutoresizingMaskIntoConstraints
=
false
t
.
backgroundColor
=
MaterialTheme
.
c
lear
.
color
t
.
backgroundColor
=
MaterialTheme
.
c
olor
.
clear
.
base
t
.
font
=
Roboto
.
regular
t
.
numberOfLines
=
0
t
.
lineBreakMode
=
.
ByTruncatingTail
if
nil
==
imageView
{
titleLabelContainer
!.
backgroundColor
=
MaterialTheme
.
c
lear
.
color
t
.
textColor
=
MaterialTheme
.
black
.
color
titleLabelContainer
!.
backgroundColor
=
MaterialTheme
.
c
olor
.
clear
.
base
t
.
textColor
=
MaterialTheme
.
color
.
black
.
base
}
else
{
titleLabelContainer
!.
backgroundColor
=
MaterialTheme
.
c
lear
.
color
t
.
textColor
=
MaterialTheme
.
c
lear
.
color
titleLabelContainer
!.
backgroundColor
=
MaterialTheme
.
c
olor
.
clear
.
base
t
.
textColor
=
MaterialTheme
.
c
olor
.
clear
.
base
titleLabelContainer
!.
removeFromSuperview
()
imageViewContainer
!.
addSubview
(
titleLabelContainer
!
)
}
...
...
@@ -381,15 +381,15 @@ public class ImageCardView : MaterialCardView, Comparable {
if
nil
==
detailLabelContainer
{
detailLabelContainer
=
UIView
()
detailLabelContainer
!.
translatesAutoresizingMaskIntoConstraints
=
false
detailLabelContainer
!.
backgroundColor
=
MaterialTheme
.
c
lear
.
color
detailLabelContainer
!.
backgroundColor
=
MaterialTheme
.
c
olor
.
clear
.
base
addSubview
(
detailLabelContainer
!
)
}
// text
detailLabelContainer
!.
addSubview
(
l
)
l
.
translatesAutoresizingMaskIntoConstraints
=
false
l
.
textColor
=
MaterialTheme
.
black
.
color
l
.
backgroundColor
=
MaterialTheme
.
c
lear
.
color
l
.
textColor
=
MaterialTheme
.
color
.
black
.
base
l
.
backgroundColor
=
MaterialTheme
.
c
olor
.
clear
.
base
l
.
font
=
Roboto
.
light
l
.
numberOfLines
=
0
l
.
lineBreakMode
=
.
ByTruncatingTail
...
...
@@ -408,7 +408,7 @@ public class ImageCardView : MaterialCardView, Comparable {
didSet
{
if
let
d
=
divider
{
d
.
translatesAutoresizingMaskIntoConstraints
=
false
d
.
backgroundColor
=
MaterialTheme
.
blueGrey
.
lighten5
d
.
backgroundColor
=
MaterialTheme
.
color
.
blueGrey
.
lighten5
addSubview
(
d
)
}
else
{
divider
?
.
removeFromSuperview
()
...
...
@@ -433,7 +433,7 @@ public class ImageCardView : MaterialCardView, Comparable {
}
else
if
nil
==
buttonsContainer
{
buttonsContainer
=
UIView
()
buttonsContainer
!.
translatesAutoresizingMaskIntoConstraints
=
false
buttonsContainer
!.
backgroundColor
=
MaterialTheme
.
c
lear
.
color
buttonsContainer
!.
backgroundColor
=
MaterialTheme
.
c
olor
.
clear
.
base
addSubview
(
buttonsContainer
!
)
}
reloadView
()
...
...
@@ -451,7 +451,7 @@ public class ImageCardView : MaterialCardView, Comparable {
}
else
if
nil
==
buttonsContainer
{
buttonsContainer
=
UIView
()
buttonsContainer
!.
translatesAutoresizingMaskIntoConstraints
=
false
buttonsContainer
!.
backgroundColor
=
MaterialTheme
.
c
lear
.
color
buttonsContainer
!.
backgroundColor
=
MaterialTheme
.
c
olor
.
clear
.
base
addSubview
(
buttonsContainer
!
)
}
else
{
for
v
in
buttonsContainer
!.
subviews
{
...
...
@@ -638,7 +638,7 @@ public class ImageCardView : MaterialCardView, Comparable {
internal
override
func
prepareView
()
{
super
.
prepareView
()
prepareShadow
()
backgroundColor
=
MaterialTheme
.
white
.
color
backgroundColor
=
MaterialTheme
.
color
.
white
.
base
}
}
...
...
Source/MaterialButton.swift
View file @
973a8015
...
...
@@ -44,7 +44,7 @@ public class MaterialButton : UIButton {
/**
:name: pulseColor
*/
public
var
pulseColor
:
UIColor
?
=
MaterialTheme
.
white
.
color
public
var
pulseColor
:
UIColor
?
=
MaterialTheme
.
color
.
white
.
base
/**
:name: init
...
...
@@ -119,7 +119,7 @@ public class MaterialButton : UIButton {
// :name: prepareShadow
//
internal
func
prepareShadow
()
{
layer
.
shadowColor
=
MaterialTheme
.
black
.
color
.
CGColor
layer
.
shadowColor
=
MaterialTheme
.
color
.
black
.
base
.
CGColor
layer
.
shadowOffset
=
CGSizeMake
(
0.1
,
0.1
)
layer
.
shadowOpacity
=
0.4
layer
.
shadowRadius
=
2
...
...
Source/MaterialCardView.swift
View file @
973a8015
...
...
@@ -49,7 +49,7 @@ public class MaterialCardView : UIView {
/**
:name: pulseColor
*/
public
var
pulseColor
:
UIColor
?
=
MaterialTheme
.
blueGrey
.
lighten3
public
var
pulseColor
:
UIColor
?
=
MaterialTheme
.
color
.
blueGrey
.
lighten3
/**
:name: init
...
...
@@ -113,7 +113,7 @@ public class MaterialCardView : UIView {
// :name: prepareShadow
//
internal
func
prepareShadow
()
{
layer
.
shadowColor
=
MaterialTheme
.
black
.
color
.
CGColor
layer
.
shadowColor
=
MaterialTheme
.
color
.
black
.
base
.
CGColor
layer
.
shadowOffset
=
CGSizeMake
(
0.1
,
0.1
)
layer
.
shadowOpacity
=
0.4
layer
.
shadowRadius
=
2
...
...
@@ -123,7 +123,7 @@ public class MaterialCardView : UIView {
// :name: removeShadow
//
internal
func
removeShadow
()
{
layer
.
shadowColor
=
MaterialTheme
.
c
lear
.
color
.
CGColor
layer
.
shadowColor
=
MaterialTheme
.
c
olor
.
clear
.
base
.
CGColor
layer
.
shadowOffset
=
CGSizeMake
(
0
,
0
)
layer
.
shadowOpacity
=
0
layer
.
shadowRadius
=
0
...
...
Source/MaterialTheme+Color.swift
0 → 100644
View file @
973a8015
//
// Copyright (C) 2015 GraphKit, Inc. <http://graphkit.io> and other GraphKit contributors.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published
// by the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program located at the root of the software package
// in a file called LICENSE. If not, see <http://www.gnu.org/licenses/>.
//
import
UIKit
// color
public
extension
MaterialTheme
{
public
struct
color
{
// clear
public
struct
clear
{
public
static
let
base
:
UIColor
=
UIColor
.
clearColor
()
}
// white
public
struct
white
{
public
static
let
base
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
255
/
255
,
blue
:
255
/
255
,
alpha
:
1
)
}
// black
public
struct
black
{
public
static
let
base
:
UIColor
=
UIColor
(
red
:
0
/
255
,
green
:
0
/
255
,
blue
:
0
/
255
,
alpha
:
1
)
}
// red
public
struct
red
{
public
static
let
lighten5
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
235
/
255
,
blue
:
238
/
255
,
alpha
:
1
)
public
static
let
lighten4
:
UIColor
=
UIColor
(
red
:
225
/
255
,
green
:
205
/
255
,
blue
:
210
/
255
,
alpha
:
1
)
public
static
let
lighten3
:
UIColor
=
UIColor
(
red
:
239
/
255
,
green
:
154
/
255
,
blue
:
254
/
255
,
alpha
:
1
)
public
static
let
lighten2
:
UIColor
=
UIColor
(
red
:
229
/
255
,
green
:
115
/
255
,
blue
:
115
/
255
,
alpha
:
1
)
public
static
let
lighten1
:
UIColor
=
UIColor
(
red
:
229
/
255
,
green
:
83
/
255
,
blue
:
80
/
255
,
alpha
:
1
)
public
static
let
base
:
UIColor
=
UIColor
(
red
:
244
/
255
,
green
:
67
/
255
,
blue
:
54
/
255
,
alpha
:
1
)
public
static
let
darken1
:
UIColor
=
UIColor
(
red
:
229
/
255
,
green
:
57
/
255
,
blue
:
53
/
255
,
alpha
:
1
)
public
static
let
darken2
:
UIColor
=
UIColor
(
red
:
211
/
255
,
green
:
47
/
255
,
blue
:
47
/
255
,
alpha
:
1
)
public
static
let
darken3
:
UIColor
=
UIColor
(
red
:
198
/
255
,
green
:
40
/
255
,
blue
:
40
/
255
,
alpha
:
1
)
public
static
let
darken4
:
UIColor
=
UIColor
(
red
:
183
/
255
,
green
:
28
/
255
,
blue
:
28
/
255
,
alpha
:
1
)
public
static
let
accent1
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
138
/
255
,
blue
:
128
/
255
,
alpha
:
1
)
public
static
let
accent2
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
82
/
255
,
blue
:
82
/
255
,
alpha
:
1
)
public
static
let
accent3
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
23
/
255
,
blue
:
68
/
255
,
alpha
:
1
)
public
static
let
accent4
:
UIColor
=
UIColor
(
red
:
213
/
255
,
green
:
0
/
255
,
blue
:
0
/
255
,
alpha
:
1
)
}
// pink
public
struct
pink
{
public
static
let
lighten5
:
UIColor
=
UIColor
(
red
:
252
/
255
,
green
:
228
/
255
,
blue
:
236
/
255
,
alpha
:
1
)
public
static
let
lighten4
:
UIColor
=
UIColor
(
red
:
248
/
255
,
green
:
107
/
255
,
blue
:
208
/
255
,
alpha
:
1
)
public
static
let
lighten3
:
UIColor
=
UIColor
(
red
:
244
/
255
,
green
:
143
/
255
,
blue
:
177
/
255
,
alpha
:
1
)
public
static
let
lighten2
:
UIColor
=
UIColor
(
red
:
240
/
255
,
green
:
98
/
255
,
blue
:
146
/
255
,
alpha
:
1
)
public
static
let
lighten1
:
UIColor
=
UIColor
(
red
:
236
/
255
,
green
:
64
/
255
,
blue
:
122
/
255
,
alpha
:
1
)
public
static
let
base
:
UIColor
=
UIColor
(
red
:
233
/
255
,
green
:
30
/
255
,
blue
:
99
/
255
,
alpha
:
1
)
public
static
let
darken1
:
UIColor
=
UIColor
(
red
:
216
/
255
,
green
:
27
/
255
,
blue
:
96
/
255
,
alpha
:
1
)
public
static
let
darken2
:
UIColor
=
UIColor
(
red
:
194
/
255
,
green
:
24
/
255
,
blue
:
191
/
255
,
alpha
:
1
)
public
static
let
darken3
:
UIColor
=
UIColor
(
red
:
173
/
255
,
green
:
20
/
255
,
blue
:
87
/
255
,
alpha
:
1
)
public
static
let
darken4
:
UIColor
=
UIColor
(
red
:
136
/
255
,
green
:
14
/
255
,
blue
:
79
/
255
,
alpha
:
1
)
public
static
let
accent1
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
128
/
255
,
blue
:
171
/
255
,
alpha
:
1
)
public
static
let
accent2
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
64
/
255
,
blue
:
129
/
255
,
alpha
:
1
)
public
static
let
accent3
:
UIColor
=
UIColor
(
red
:
245
/
255
,
green
:
0
/
255
,
blue
:
87
/
255
,
alpha
:
1
)
public
static
let
accent4
:
UIColor
=
UIColor
(
red
:
197
/
255
,
green
:
17
/
255
,
blue
:
98
/
255
,
alpha
:
1
)
}
// purple
public
struct
purple
{
public
static
let
lighten5
:
UIColor
=
UIColor
(
red
:
243
/
255
,
green
:
229
/
255
,
blue
:
245
/
255
,
alpha
:
1
)
public
static
let
lighten4
:
UIColor
=
UIColor
(
red
:
225
/
255
,
green
:
190
/
255
,
blue
:
231
/
255
,
alpha
:
1
)
public
static
let
lighten3
:
UIColor
=
UIColor
(
red
:
206
/
255
,
green
:
147
/
255
,
blue
:
216
/
255
,
alpha
:
1
)
public
static
let
lighten2
:
UIColor
=
UIColor
(
red
:
186
/
255
,
green
:
104
/
255
,
blue
:
200
/
255
,
alpha
:
1
)
public
static
let
lighten1
:
UIColor
=
UIColor
(
red
:
171
/
255
,
green
:
71
/
255
,
blue
:
188
/
255
,
alpha
:
1
)
public
static
let
base
:
UIColor
=
UIColor
(
red
:
156
/
255
,
green
:
39
/
255
,
blue
:
176
/
255
,
alpha
:
1
)
public
static
let
darken1
:
UIColor
=
UIColor
(
red
:
142
/
255
,
green
:
36
/
255
,
blue
:
170
/
255
,
alpha
:
1
)
public
static
let
darken2
:
UIColor
=
UIColor
(
red
:
123
/
255
,
green
:
31
/
255
,
blue
:
162
/
255
,
alpha
:
1
)
public
static
let
darken3
:
UIColor
=
UIColor
(
red
:
106
/
255
,
green
:
27
/
255
,
blue
:
154
/
255
,
alpha
:
1
)
public
static
let
darken4
:
UIColor
=
UIColor
(
red
:
74
/
255
,
green
:
20
/
255
,
blue
:
140
/
255
,
alpha
:
1
)
public
static
let
accent1
:
UIColor
=
UIColor
(
red
:
234
/
255
,
green
:
128
/
255
,
blue
:
252
/
255
,
alpha
:
1
)
public
static
let
accent2
:
UIColor
=
UIColor
(
red
:
224
/
255
,
green
:
64
/
255
,
blue
:
251
/
255
,
alpha
:
1
)
public
static
let
accent3
:
UIColor
=
UIColor
(
red
:
213
/
255
,
green
:
0
/
255
,
blue
:
249
/
255
,
alpha
:
1
)
public
static
let
accent4
:
UIColor
=
UIColor
(
red
:
170
/
255
,
green
:
0
/
255
,
blue
:
255
/
255
,
alpha
:
1
)
}
// deepPurple
public
struct
deepPurple
{
public
static
let
lighten5
:
UIColor
=
UIColor
(
red
:
237
/
255
,
green
:
231
/
255
,
blue
:
246
/
255
,
alpha
:
1
)
public
static
let
lighten4
:
UIColor
=
UIColor
(
red
:
209
/
255
,
green
:
196
/
255
,
blue
:
233
/
255
,
alpha
:
1
)
public
static
let
lighten3
:
UIColor
=
UIColor
(
red
:
179
/
255
,
green
:
157
/
255
,
blue
:
219
/
255
,
alpha
:
1
)
public
static
let
lighten2
:
UIColor
=
UIColor
(
red
:
149
/
255
,
green
:
117
/
255
,
blue
:
205
/
255
,
alpha
:
1
)
public
static
let
lighten1
:
UIColor
=
UIColor
(
red
:
126
/
255
,
green
:
87
/
255
,
blue
:
194
/
255
,
alpha
:
1
)
public
static
let
base
:
UIColor
=
UIColor
(
red
:
103
/
255
,
green
:
58
/
255
,
blue
:
183
/
255
,
alpha
:
1
)
public
static
let
darken1
:
UIColor
=
UIColor
(
red
:
94
/
255
,
green
:
53
/
255
,
blue
:
177
/
255
,
alpha
:
1
)
public
static
let
darken2
:
UIColor
=
UIColor
(
red
:
81
/
255
,
green
:
45
/
255
,
blue
:
168
/
255
,
alpha
:
1
)
public
static
let
darken3
:
UIColor
=
UIColor
(
red
:
69
/
255
,
green
:
39
/
255
,
blue
:
160
/
255
,
alpha
:
1
)
public
static
let
darken4
:
UIColor
=
UIColor
(
red
:
49
/
255
,
green
:
27
/
255
,
blue
:
146
/
255
,
alpha
:
1
)
public
static
let
accent1
:
UIColor
=
UIColor
(
red
:
179
/
255
,
green
:
136
/
255
,
blue
:
255
/
255
,
alpha
:
1
)
public
static
let
accent2
:
UIColor
=
UIColor
(
red
:
124
/
255
,
green
:
77
/
255
,
blue
:
255
/
255
,
alpha
:
1
)
public
static
let
accent3
:
UIColor
=
UIColor
(
red
:
101
/
255
,
green
:
31
/
255
,
blue
:
255
/
255
,
alpha
:
1
)
public
static
let
accent4
:
UIColor
=
UIColor
(
red
:
98
/
255
,
green
:
0
/
255
,
blue
:
234
/
255
,
alpha
:
1
)
}
// indigo
public
struct
indigo
{
public
static
let
lighten5
:
UIColor
=
UIColor
(
red
:
232
/
255
,
green
:
234
/
255
,
blue
:
246
/
255
,
alpha
:
1
)
public
static
let
lighten4
:
UIColor
=
UIColor
(
red
:
197
/
255
,
green
:
202
/
255
,
blue
:
233
/
255
,
alpha
:
1
)
public
static
let
lighten3
:
UIColor
=
UIColor
(
red
:
159
/
255
,
green
:
168
/
255
,
blue
:
218
/
255
,
alpha
:
1
)
public
static
let
lighten2
:
UIColor
=
UIColor
(
red
:
121
/
255
,
green
:
134
/
255
,
blue
:
203
/
255
,
alpha
:
1
)
public
static
let
lighten1
:
UIColor
=
UIColor
(
red
:
92
/
255
,
green
:
107
/
255
,
blue
:
192
/
255
,
alpha
:
1
)
public
static
let
base
:
UIColor
=
UIColor
(
red
:
63
/
255
,
green
:
81
/
255
,
blue
:
181
/
255
,
alpha
:
1
)
public
static
let
darken1
:
UIColor
=
UIColor
(
red
:
57
/
255
,
green
:
73
/
255
,
blue
:
171
/
255
,
alpha
:
1
)
public
static
let
darken2
:
UIColor
=
UIColor
(
red
:
48
/
255
,
green
:
63
/
255
,
blue
:
159
/
255
,
alpha
:
1
)
public
static
let
darken3
:
UIColor
=
UIColor
(
red
:
40
/
255
,
green
:
53
/
255
,
blue
:
147
/
255
,
alpha
:
1
)
public
static
let
darken4
:
UIColor
=
UIColor
(
red
:
26
/
255
,
green
:
35
/
255
,
blue
:
126
/
255
,
alpha
:
1
)
public
static
let
accent1
:
UIColor
=
UIColor
(
red
:
140
/
255
,
green
:
158
/
255
,
blue
:
255
/
255
,
alpha
:
1
)
public
static
let
accent2
:
UIColor
=
UIColor
(
red
:
83
/
255
,
green
:
109
/
255
,
blue
:
254
/
255
,
alpha
:
1
)
public
static
let
accent3
:
UIColor
=
UIColor
(
red
:
61
/
255
,
green
:
90
/
255
,
blue
:
254
/
255
,
alpha
:
1
)
public
static
let
accent4
:
UIColor
=
UIColor
(
red
:
48
/
255
,
green
:
79
/
255
,
blue
:
254
/
255
,
alpha
:
1
)
}
// blue
public
struct
blue
{
public
static
let
lighten5
:
UIColor
=
UIColor
(
red
:
227
/
255
,
green
:
242
/
255
,
blue
:
253
/
255
,
alpha
:
1
)
public
static
let
lighten4
:
UIColor
=
UIColor
(
red
:
187
/
255
,
green
:
222
/
255
,
blue
:
251
/
255
,
alpha
:
1
)
public
static
let
lighten3
:
UIColor
=
UIColor
(
red
:
144
/
255
,
green
:
202
/
255
,
blue
:
249
/
255
,
alpha
:
1
)
public
static
let
lighten2
:
UIColor
=
UIColor
(
red
:
100
/
255
,
green
:
181
/
255
,
blue
:
246
/
255
,
alpha
:
1
)
public
static
let
lighten1
:
UIColor
=
UIColor
(
red
:
66
/
255
,
green
:
165
/
255
,
blue
:
245
/
255
,
alpha
:
1
)
public
static
let
base
:
UIColor
=
UIColor
(
red
:
33
/
255
,
green
:
150
/
255
,
blue
:
243
/
255
,
alpha
:
1
)
public
static
let
darken1
:
UIColor
=
UIColor
(
red
:
30
/
255
,
green
:
136
/
255
,
blue
:
229
/
255
,
alpha
:
1
)
public
static
let
darken2
:
UIColor
=
UIColor
(
red
:
25
/
255
,
green
:
118
/
255
,
blue
:
210
/
255
,
alpha
:
1
)
public
static
let
darken3
:
UIColor
=
UIColor
(
red
:
21
/
255
,
green
:
101
/
255
,
blue
:
192
/
255
,
alpha
:
1
)
public
static
let
darken4
:
UIColor
=
UIColor
(
red
:
13
/
255
,
green
:
71
/
255
,
blue
:
161
/
255
,
alpha
:
1
)
public
static
let
accent1
:
UIColor
=
UIColor
(
red
:
130
/
255
,
green
:
177
/
255
,
blue
:
255
/
255
,
alpha
:
1
)
public
static
let
accent2
:
UIColor
=
UIColor
(
red
:
68
/
255
,
green
:
138
/
255
,
blue
:
255
/
255
,
alpha
:
1
)
public
static
let
accent3
:
UIColor
=
UIColor
(
red
:
41
/
255
,
green
:
121
/
255
,
blue
:
255
/
255
,
alpha
:
1
)
public
static
let
accent4
:
UIColor
=
UIColor
(
red
:
41
/
255
,
green
:
98
/
255
,
blue
:
255
/
255
,
alpha
:
1
)
}
// light blue
public
struct
lightBlue
{
public
static
let
lighten5
:
UIColor
=
UIColor
(
red
:
225
/
255
,
green
:
245
/
255
,
blue
:
254
/
255
,
alpha
:
1
)
public
static
let
lighten4
:
UIColor
=
UIColor
(
red
:
179
/
255
,
green
:
229
/
255
,
blue
:
252
/
255
,
alpha
:
1
)
public
static
let
lighten3
:
UIColor
=
UIColor
(
red
:
129
/
255
,
green
:
212
/
255
,
blue
:
250
/
255
,
alpha
:
1
)
public
static
let
lighten2
:
UIColor
=
UIColor
(
red
:
79
/
255
,
green
:
195
/
255
,
blue
:
247
/
255
,
alpha
:
1
)
public
static
let
lighten1
:
UIColor
=
UIColor
(
red
:
41
/
255
,
green
:
182
/
255
,
blue
:
246
/
255
,
alpha
:
1
)
public
static
let
base
:
UIColor
=
UIColor
(
red
:
3
/
255
,
green
:
169
/
255
,
blue
:
244
/
255
,
alpha
:
1
)
public
static
let
darken1
:
UIColor
=
UIColor
(
red
:
3
/
255
,
green
:
155
/
255
,
blue
:
229
/
255
,
alpha
:
1
)
public
static
let
darken2
:
UIColor
=
UIColor
(
red
:
2
/
255
,
green
:
136
/
255
,
blue
:
209
/
255
,
alpha
:
1
)
public
static
let
darken3
:
UIColor
=
UIColor
(
red
:
2
/
255
,
green
:
119
/
255
,
blue
:
189
/
255
,
alpha
:
1
)
public
static
let
darken4
:
UIColor
=
UIColor
(
red
:
1
/
255
,
green
:
87
/
255
,
blue
:
155
/
255
,
alpha
:
1
)
public
static
let
accent1
:
UIColor
=
UIColor
(
red
:
128
/
255
,
green
:
216
/
255
,
blue
:
255
/
255
,
alpha
:
1
)
public
static
let
accent2
:
UIColor
=
UIColor
(
red
:
64
/
255
,
green
:
196
/
255
,
blue
:
255
/
255
,
alpha
:
1
)
public
static
let
accent3
:
UIColor
=
UIColor
(
red
:
0
/
255
,
green
:
176
/
255
,
blue
:
255
/
255
,
alpha
:
1
)
public
static
let
accent4
:
UIColor
=
UIColor
(
red
:
0
/
255
,
green
:
145
/
255
,
blue
:
234
/
255
,
alpha
:
1
)
}
// cyan
public
struct
cyab
{
public
static
let
lighten5
:
UIColor
=
UIColor
(
red
:
224
/
255
,
green
:
247
/
255
,
blue
:
250
/
255
,
alpha
:
1
)
public
static
let
lighten4
:
UIColor
=
UIColor
(
red
:
1178
/
255
,
green
:
235
/
255
,
blue
:
242
/
255
,
alpha
:
1
)
public
static
let
lighten3
:
UIColor
=
UIColor
(
red
:
128
/
255
,
green
:
222
/
255
,
blue
:
2343
/
255
,
alpha
:
1
)
public
static
let
lighten2
:
UIColor
=
UIColor
(
red
:
77
/
255
,
green
:
208
/
255
,
blue
:
225
/
255
,
alpha
:
1
)
public
static
let
lighten1
:
UIColor
=
UIColor
(
red
:
38
/
255
,
green
:
198
/
255
,
blue
:
218
/
255
,
alpha
:
1
)
public
static
let
base
:
UIColor
=
UIColor
(
red
:
0
/
255
,
green
:
188
/
255
,
blue
:
212
/
255
,
alpha
:
1
)
public
static
let
darken1
:
UIColor
=
UIColor
(
red
:
0
/
255
,
green
:
172
/
255
,
blue
:
193
/
255
,
alpha
:
1
)
public
static
let
darken2
:
UIColor
=
UIColor
(
red
:
0
/
255
,
green
:
151
/
255
,
blue
:
167
/
255
,
alpha
:
1
)
public
static
let
darken3
:
UIColor
=
UIColor
(
red
:
0
/
255
,
green
:
131
/
255
,
blue
:
143
/
255
,
alpha
:
1
)
public
static
let
darken4
:
UIColor
=
UIColor
(
red
:
0
/
255
,
green
:
96
/
255
,
blue
:
100
/
255
,
alpha
:
1
)
public
static
let
accent1
:
UIColor
=
UIColor
(
red
:
132
/
255
,
green
:
255
/
255
,
blue
:
255
/
255
,
alpha
:
1
)
public
static
let
accent2
:
UIColor
=
UIColor
(
red
:
24
/
255
,
green
:
255
/
255
,
blue
:
255
/
255
,
alpha
:
1
)
public
static
let
accent3
:
UIColor
=
UIColor
(
red
:
0
/
255
,
green
:
229
/
255
,
blue
:
255
/
255
,
alpha
:
1
)
public
static
let
accent4
:
UIColor
=
UIColor
(
red
:
0
/
255
,
green
:
184
/
255
,
blue
:
212
/
255
,
alpha
:
1
)
}
// teal
public
struct
teal
{
public
static
let
lighten5
:
UIColor
=
UIColor
(
red
:
224
/
255
,
green
:
242
/
255
,
blue
:
241
/
255
,
alpha
:
1
)
public
static
let
lighten4
:
UIColor
=
UIColor
(
red
:
178
/
255
,
green
:
223
/
255
,
blue
:
219
/
255
,
alpha
:
1
)
public
static
let
lighten3
:
UIColor
=
UIColor
(
red
:
128
/
255
,
green
:
203
/
255
,
blue
:
196
/
255
,
alpha
:
1
)
public
static
let
lighten2
:
UIColor
=
UIColor
(
red
:
77
/
255
,
green
:
182
/
255
,
blue
:
172
/
255
,
alpha
:
1
)
public
static
let
lighten1
:
UIColor
=
UIColor
(
red
:
38
/
255
,
green
:
166
/
255
,
blue
:
154
/
255
,
alpha
:
1
)
public
static
let
base
:
UIColor
=
UIColor
(
red
:
0
/
255
,
green
:
150
/
255
,
blue
:
136
/
255
,
alpha
:
1
)
public
static
let
darken1
:
UIColor
=
UIColor
(
red
:
0
/
255
,
green
:
137
/
255
,
blue
:
123
/
255
,
alpha
:
1
)
public
static
let
darken2
:
UIColor
=
UIColor
(
red
:
0
/
255
,
green
:
121
/
255
,
blue
:
107
/
255
,
alpha
:
1
)
public
static
let
darken3
:
UIColor
=
UIColor
(
red
:
0
/
255
,
green
:
105
/
255
,
blue
:
92
/
255
,
alpha
:
1
)
public
static
let
darken4
:
UIColor
=
UIColor
(
red
:
0
/
255
,
green
:
77
/
255
,
blue
:
64
/
255
,
alpha
:
1
)
public
static
let
accent1
:
UIColor
=
UIColor
(
red
:
167
/
255
,
green
:
255
/
255
,
blue
:
235
/
255
,
alpha
:
1
)
public
static
let
accent2
:
UIColor
=
UIColor
(
red
:
100
/
255
,
green
:
255
/
255
,
blue
:
218
/
255
,
alpha
:
1
)
public
static
let
accent3
:
UIColor
=
UIColor
(
red
:
29
/
255
,
green
:
133
/
255
,
blue
:
182
/
255
,
alpha
:
1
)
public
static
let
accent4
:
UIColor
=
UIColor
(
red
:
0
/
255
,
green
:
191
/
255
,
blue
:
165
/
255
,
alpha
:
1
)
}
// green
public
struct
green
{
public
static
let
lighten5
:
UIColor
=
UIColor
(
red
:
232
/
255
,
green
:
245
/
255
,
blue
:
233
/
255
,
alpha
:
1
)
public
static
let
lighten4
:
UIColor
=
UIColor
(
red
:
200
/
255
,
green
:
230
/
255
,
blue
:
201
/
255
,
alpha
:
1
)
public
static
let
lighten3
:
UIColor
=
UIColor
(
red
:
165
/
255
,
green
:
214
/
255
,
blue
:
167
/
255
,
alpha
:
1
)
public
static
let
lighten2
:
UIColor
=
UIColor
(
red
:
129
/
255
,
green
:
199
/
255
,
blue
:
132
/
255
,
alpha
:
1
)
public
static
let
lighten1
:
UIColor
=
UIColor
(
red
:
102
/
255
,
green
:
187
/
255
,
blue
:
106
/
255
,
alpha
:
1
)
public
static
let
base
:
UIColor
=
UIColor
(
red
:
76
/
255
,
green
:
175
/
255
,
blue
:
80
/
255
,
alpha
:
1
)
public
static
let
darken1
:
UIColor
=
UIColor
(
red
:
67
/
255
,
green
:
160
/
255
,
blue
:
71
/
255
,
alpha
:
1
)
public
static
let
darken2
:
UIColor
=
UIColor
(
red
:
56
/
255
,
green
:
142
/
255
,
blue
:
60
/
255
,
alpha
:
1
)
public
static
let
darken3
:
UIColor
=
UIColor
(
red
:
46
/
255
,
green
:
125
/
255
,
blue
:
50
/
255
,
alpha
:
1
)
public
static
let
darken4
:
UIColor
=
UIColor
(
red
:
27
/
255
,
green
:
94
/
255
,
blue
:
32
/
255
,
alpha
:
1
)
public
static
let
accent1
:
UIColor
=
UIColor
(
red
:
185
/
255
,
green
:
246
/
255
,
blue
:
202
/
255
,
alpha
:
1
)
public
static
let
accent2
:
UIColor
=
UIColor
(
red
:
105
/
255
,
green
:
240
/
255
,
blue
:
174
/
255
,
alpha
:
1
)
public
static
let
accent3
:
UIColor
=
UIColor
(
red
:
0
/
255
,
green
:
230
/
255
,
blue
:
118
/
255
,
alpha
:
1
)
public
static
let
accent4
:
UIColor
=
UIColor
(
red
:
0
/
255
,
green
:
200
/
255
,
blue
:
83
/
255
,
alpha
:
1
)
}
// light green
public
struct
lightGreen
{
public
static
let
lighten5
:
UIColor
=
UIColor
(
red
:
241
/
255
,
green
:
248
/
255
,
blue
:
233
/
255
,
alpha
:
1
)
public
static
let
lighten4
:
UIColor
=
UIColor
(
red
:
220
/
255
,
green
:
237
/
255
,
blue
:
200
/
255
,
alpha
:
1
)
public
static
let
lighten3
:
UIColor
=
UIColor
(
red
:
197
/
255
,
green
:
225
/
255
,
blue
:
165
/
255
,
alpha
:
1
)
public
static
let
lighten2
:
UIColor
=
UIColor
(
red
:
174
/
255
,
green
:
213
/
255
,
blue
:
129
/
255
,
alpha
:
1
)
public
static
let
lighten1
:
UIColor
=
UIColor
(
red
:
156
/
255
,
green
:
204
/
255
,
blue
:
101
/
255
,
alpha
:
1
)
public
static
let
base
:
UIColor
=
UIColor
(
red
:
139
/
255
,
green
:
195
/
255
,
blue
:
74
/
255
,
alpha
:
1
)
public
static
let
darken1
:
UIColor
=
UIColor
(
red
:
124
/
255
,
green
:
179
/
255
,
blue
:
66
/
255
,
alpha
:
1
)
public
static
let
darken2
:
UIColor
=
UIColor
(
red
:
104
/
255
,
green
:
159
/
255
,
blue
:
56
/
255
,
alpha
:
1
)
public
static
let
darken3
:
UIColor
=
UIColor
(
red
:
85
/
255
,
green
:
139
/
255
,
blue
:
47
/
255
,
alpha
:
1
)
public
static
let
darken4
:
UIColor
=
UIColor
(
red
:
51
/
255
,
green
:
105
/
255
,
blue
:
30
/
255
,
alpha
:
1
)
public
static
let
accent1
:
UIColor
=
UIColor
(
red
:
204
/
255
,
green
:
255
/
255
,
blue
:
144
/
255
,
alpha
:
1
)
public
static
let
accent2
:
UIColor
=
UIColor
(
red
:
178
/
255
,
green
:
255
/
255
,
blue
:
89
/
255
,
alpha
:
1
)
public
static
let
accent3
:
UIColor
=
UIColor
(
red
:
118
/
255
,
green
:
255
/
255
,
blue
:
3
/
255
,
alpha
:
1
)
public
static
let
accent4
:
UIColor
=
UIColor
(
red
:
100
/
255
,
green
:
221
/
255
,
blue
:
23
/
255
,
alpha
:
1
)
}
// lime
public
struct
lime
{
public
static
let
lighten5
:
UIColor
=
UIColor
(
red
:
249
/
255
,
green
:
251
/
255
,
blue
:
231
/
255
,
alpha
:
1
)
public
static
let
lighten4
:
UIColor
=
UIColor
(
red
:
240
/
255
,
green
:
244
/
255
,
blue
:
195
/
255
,
alpha
:
1
)
public
static
let
lighten3
:
UIColor
=
UIColor
(
red
:
230
/
255
,
green
:
238
/
255
,
blue
:
156
/
255
,
alpha
:
1
)
public
static
let
lighten2
:
UIColor
=
UIColor
(
red
:
220
/
255
,
green
:
231
/
255
,
blue
:
117
/
255
,
alpha
:
1
)
public
static
let
lighten1
:
UIColor
=
UIColor
(
red
:
212
/
255
,
green
:
225
/
255
,
blue
:
87
/
255
,
alpha
:
1
)
public
static
let
base
:
UIColor
=
UIColor
(
red
:
205
/
255
,
green
:
220
/
255
,
blue
:
57
/
255
,
alpha
:
1
)
public
static
let
darken1
:
UIColor
=
UIColor
(
red
:
192
/
255
,
green
:
202
/
255
,
blue
:
51
/
255
,
alpha
:
1
)
public
static
let
darken2
:
UIColor
=
UIColor
(
red
:
175
/
255
,
green
:
180
/
255
,
blue
:
43
/
255
,
alpha
:
1
)
public
static
let
darken3
:
UIColor
=
UIColor
(
red
:
158
/
255
,
green
:
157
/
255
,
blue
:
36
/
255
,
alpha
:
1
)
public
static
let
darken4
:
UIColor
=
UIColor
(
red
:
130
/
255
,
green
:
119
/
255
,
blue
:
23
/
255
,
alpha
:
1
)
public
static
let
accent1
:
UIColor
=
UIColor
(
red
:
244
/
255
,
green
:
255
/
255
,
blue
:
129
/
255
,
alpha
:
1
)
public
static
let
accent2
:
UIColor
=
UIColor
(
red
:
238
/
255
,
green
:
255
/
255
,
blue
:
65
/
255
,
alpha
:
1
)
public
static
let
accent3
:
UIColor
=
UIColor
(
red
:
198
/
255
,
green
:
255
/
255
,
blue
:
0
/
255
,
alpha
:
1
)
public
static
let
accent4
:
UIColor
=
UIColor
(
red
:
174
/
255
,
green
:
234
/
255
,
blue
:
0
/
255
,
alpha
:
1
)
}
// yellow
public
struct
yellow
{
public
static
let
lighten5
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
253
/
255
,
blue
:
231
/
255
,
alpha
:
1
)
public
static
let
lighten4
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
249
/
255
,
blue
:
196
/
255
,
alpha
:
1
)
public
static
let
lighten3
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
245
/
255
,
blue
:
157
/
255
,
alpha
:
1
)
public
static
let
lighten2
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
241
/
255
,
blue
:
118
/
255
,
alpha
:
1
)
public
static
let
lighten1
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
238
/
255
,
blue
:
88
/
255
,
alpha
:
1
)
public
static
let
base
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
235
/
255
,
blue
:
59
/
255
,
alpha
:
1
)
public
static
let
darken1
:
UIColor
=
UIColor
(
red
:
253
/
255
,
green
:
216
/
255
,
blue
:
53
/
255
,
alpha
:
1
)
public
static
let
darken2
:
UIColor
=
UIColor
(
red
:
251
/
255
,
green
:
192
/
255
,
blue
:
45
/
255
,
alpha
:
1
)
public
static
let
darken3
:
UIColor
=
UIColor
(
red
:
249
/
255
,
green
:
168
/
255
,
blue
:
37
/
255
,
alpha
:
1
)
public
static
let
darken4
:
UIColor
=
UIColor
(
red
:
245
/
255
,
green
:
127
/
255
,
blue
:
23
/
255
,
alpha
:
1
)
public
static
let
accent1
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
255
/
255
,
blue
:
141
/
255
,
alpha
:
1
)
public
static
let
accent2
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
255
/
255
,
blue
:
0
/
255
,
alpha
:
1
)
public
static
let
accent3
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
234
/
255
,
blue
:
0
/
255
,
alpha
:
1
)
public
static
let
accent4
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
214
/
255
,
blue
:
0
/
255
,
alpha
:
1
)
}
// amber
public
struct
amber
{
public
static
let
lighten5
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
248
/
255
,
blue
:
225
/
255
,
alpha
:
1
)
public
static
let
lighten4
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
236
/
255
,
blue
:
179
/
255
,
alpha
:
1
)
public
static
let
lighten3
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
224
/
255
,
blue
:
130
/
255
,
alpha
:
1
)
public
static
let
lighten2
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
213
/
255
,
blue
:
79
/
255
,
alpha
:
1
)
public
static
let
lighten1
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
202
/
255
,
blue
:
40
/
255
,
alpha
:
1
)
public
static
let
base
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
193
/
255
,
blue
:
7
/
255
,
alpha
:
1
)
public
static
let
darken1
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
179
/
255
,
blue
:
0
/
255
,
alpha
:
1
)
public
static
let
darken2
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
160
/
255
,
blue
:
0
/
255
,
alpha
:
1
)
public
static
let
darken3
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
143
/
255
,
blue
:
0
/
255
,
alpha
:
1
)
public
static
let
darken4
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
111
/
255
,
blue
:
0
/
255
,
alpha
:
1
)
public
static
let
accent1
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
229
/
255
,
blue
:
127
/
255
,
alpha
:
1
)
public
static
let
accent2
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
215
/
255
,
blue
:
64
/
255
,
alpha
:
1
)
public
static
let
accent3
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
196
/
255
,
blue
:
0
/
255
,
alpha
:
1
)
public
static
let
accent4
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
171
/
255
,
blue
:
0
/
255
,
alpha
:
1
)
}
// orange
public
struct
orange
{
public
static
let
lighten5
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
243
/
255
,
blue
:
224
/
255
,
alpha
:
1
)
public
static
let
lighten4
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
224
/
255
,
blue
:
178
/
255
,
alpha
:
1
)
public
static
let
lighten3
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
204
/
255
,
blue
:
128
/
255
,
alpha
:
1
)
public
static
let
lighten2
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
183
/
255
,
blue
:
77
/
255
,
alpha
:
1
)
public
static
let
lighten1
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
167
/
255
,
blue
:
38
/
255
,
alpha
:
1
)
public
static
let
base
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
152
/
255
,
blue
:
0
/
255
,
alpha
:
1
)
public
static
let
darken1
:
UIColor
=
UIColor
(
red
:
251
/
255
,
green
:
140
/
255
,
blue
:
0
/
255
,
alpha
:
1
)
public
static
let
darken2
:
UIColor
=
UIColor
(
red
:
245
/
255
,
green
:
124
/
255
,
blue
:
0
/
255
,
alpha
:
1
)
public
static
let
darken3
:
UIColor
=
UIColor
(
red
:
239
/
255
,
green
:
108
/
255
,
blue
:
0
/
255
,
alpha
:
1
)
public
static
let
darken4
:
UIColor
=
UIColor
(
red
:
230
/
255
,
green
:
81
/
255
,
blue
:
0
/
255
,
alpha
:
1
)
public
static
let
accent1
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
209
/
255
,
blue
:
128
/
255
,
alpha
:
1
)
public
static
let
accent2
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
171
/
255
,
blue
:
64
/
255
,
alpha
:
1
)
public
static
let
accent3
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
145
/
255
,
blue
:
0
/
255
,
alpha
:
1
)
public
static
let
accent4
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
109
/
255
,
blue
:
0
/
255
,
alpha
:
1
)
}
// deep orange
public
struct
deepOrange
{
public
static
let
lighten5
:
UIColor
=
UIColor
(
red
:
251
/
255
,
green
:
233
/
255
,
blue
:
231
/
255
,
alpha
:
1
)
public
static
let
lighten4
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
204
/
255
,
blue
:
188
/
255
,
alpha
:
1
)
public
static
let
lighten3
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
171
/
255
,
blue
:
145
/
255
,
alpha
:
1
)
public
static
let
lighten2
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
138
/
255
,
blue
:
101
/
255
,
alpha
:
1
)
public
static
let
lighten1
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
112
/
255
,
blue
:
67
/
255
,
alpha
:
1
)
public
static
let
base
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
87
/
255
,
blue
:
34
/
255
,
alpha
:
1
)
public
static
let
darken1
:
UIColor
=
UIColor
(
red
:
244
/
255
,
green
:
81
/
255
,
blue
:
30
/
255
,
alpha
:
1
)
public
static
let
darken2
:
UIColor
=
UIColor
(
red
:
230
/
255
,
green
:
74
/
255
,
blue
:
25
/
255
,
alpha
:
1
)
public
static
let
darken3
:
UIColor
=
UIColor
(
red
:
216
/
255
,
green
:
67
/
255
,
blue
:
21
/
255
,
alpha
:
1
)
public
static
let
darken4
:
UIColor
=
UIColor
(
red
:
191
/
255
,
green
:
54
/
255
,
blue
:
12
/
255
,
alpha
:
1
)
public
static
let
accent1
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
158
/
255
,
blue
:
128
/
255
,
alpha
:
1
)
public
static
let
accent2
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
110
/
255
,
blue
:
64
/
255
,
alpha
:
1
)
public
static
let
accent3
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
61
/
255
,
blue
:
0
/
255
,
alpha
:
1
)
public
static
let
accent4
:
UIColor
=
UIColor
(
red
:
221
/
255
,
green
:
44
/
255
,
blue
:
0
/
255
,
alpha
:
1
)
}
// brown
public
struct
brown
{
public
static
let
lighten5
:
UIColor
=
UIColor
(
red
:
239
/
255
,
green
:
235
/
255
,
blue
:
233
/
255
,
alpha
:
1
)
public
static
let
lighten4
:
UIColor
=
UIColor
(
red
:
215
/
255
,
green
:
204
/
255
,
blue
:
200
/
255
,
alpha
:
1
)
public
static
let
lighten3
:
UIColor
=
UIColor
(
red
:
188
/
255
,
green
:
170
/
255
,
blue
:
164
/
255
,
alpha
:
1
)
public
static
let
lighten2
:
UIColor
=
UIColor
(
red
:
161
/
255
,
green
:
136
/
255
,
blue
:
127
/
255
,
alpha
:
1
)
public
static
let
lighten1
:
UIColor
=
UIColor
(
red
:
141
/
255
,
green
:
110
/
255
,
blue
:
99
/
255
,
alpha
:
1
)
public
static
let
base
:
UIColor
=
UIColor
(
red
:
121
/
255
,
green
:
85
/
255
,
blue
:
72
/
255
,
alpha
:
1
)
public
static
let
darken1
:
UIColor
=
UIColor
(
red
:
109
/
255
,
green
:
76
/
255
,
blue
:
65
/
255
,
alpha
:
1
)
public
static
let
darken2
:
UIColor
=
UIColor
(
red
:
93
/
255
,
green
:
64
/
255
,
blue
:
55
/
255
,
alpha
:
1
)
public
static
let
darken3
:
UIColor
=
UIColor
(
red
:
78
/
255
,
green
:
52
/
255
,
blue
:
46
/
255
,
alpha
:
1
)
public
static
let
darken4
:
UIColor
=
UIColor
(
red
:
62
/
255
,
green
:
39
/
255
,
blue
:
35
/
255
,
alpha
:
1
)
}
// grey
public
struct
grey
{
public
static
let
lighten5
:
UIColor
=
UIColor
(
red
:
250
/
255
,
green
:
250
/
255
,
blue
:
250
/
255
,
alpha
:
1
)
public
static
let
lighten4
:
UIColor
=
UIColor
(
red
:
245
/
255
,
green
:
245
/
255
,
blue
:
245
/
255
,
alpha
:
1
)
public
static
let
lighten3
:
UIColor
=
UIColor
(
red
:
238
/
255
,
green
:
238
/
255
,
blue
:
238
/
255
,
alpha
:
1
)
public
static
let
lighten2
:
UIColor
=
UIColor
(
red
:
224
/
255
,
green
:
224
/
255
,
blue
:
224
/
255
,
alpha
:
1
)
public
static
let
lighten1
:
UIColor
=
UIColor
(
red
:
189
/
255
,
green
:
189
/
255
,
blue
:
189
/
255
,
alpha
:
1
)
public
static
let
base
:
UIColor
=
UIColor
(
red
:
158
/
255
,
green
:
158
/
255
,
blue
:
158
/
255
,
alpha
:
1
)
public
static
let
darken1
:
UIColor
=
UIColor
(
red
:
117
/
255
,
green
:
117
/
255
,
blue
:
117
/
255
,
alpha
:
1
)
public
static
let
darken2
:
UIColor
=
UIColor
(
red
:
97
/
255
,
green
:
97
/
255
,
blue
:
97
/
255
,
alpha
:
1
)
public
static
let
darken3
:
UIColor
=
UIColor
(
red
:
66
/
255
,
green
:
66
/
255
,
blue
:
66
/
255
,
alpha
:
1
)
public
static
let
darken4
:
UIColor
=
UIColor
(
red
:
33
/
255
,
green
:
33
/
255
,
blue
:
33
/
255
,
alpha
:
1
)
}
// blue grey
public
struct
blueGrey
{
public
static
let
lighten5
:
UIColor
=
UIColor
(
red
:
236
/
255
,
green
:
239
/
255
,
blue
:
241
/
255
,
alpha
:
1
)
public
static
let
lighten4
:
UIColor
=
UIColor
(
red
:
207
/
255
,
green
:
216
/
255
,
blue
:
220
/
255
,
alpha
:
1
)
public
static
let
lighten3
:
UIColor
=
UIColor
(
red
:
176
/
255
,
green
:
190
/
255
,
blue
:
197
/
255
,
alpha
:
1
)
public
static
let
lighten2
:
UIColor
=
UIColor
(
red
:
144
/
255
,
green
:
164
/
255
,
blue
:
174
/
255
,
alpha
:
1
)
public
static
let
lighten1
:
UIColor
=
UIColor
(
red
:
120
/
255
,
green
:
144
/
255
,
blue
:
156
/
255
,
alpha
:
1
)
public
static
let
base
:
UIColor
=
UIColor
(
red
:
96
/
255
,
green
:
125
/
255
,
blue
:
139
/
255
,
alpha
:
1
)
public
static
let
darken1
:
UIColor
=
UIColor
(
red
:
84
/
255
,
green
:
110
/
255
,
blue
:
122
/
255
,
alpha
:
1
)
public
static
let
darken2
:
UIColor
=
UIColor
(
red
:
69
/
255
,
green
:
90
/
255
,
blue
:
100
/
255
,
alpha
:
1
)
public
static
let
darken3
:
UIColor
=
UIColor
(
red
:
55
/
255
,
green
:
71
/
255
,
blue
:
79
/
255
,
alpha
:
1
)
public
static
let
darken4
:
UIColor
=
UIColor
(
red
:
38
/
255
,
green
:
50
/
255
,
blue
:
56
/
255
,
alpha
:
1
)
}
}
}
Source/MaterialTheme+Font.swift
0 → 100644
View file @
973a8015
//
// Copyright (C) 2015 GraphKit, Inc. <http://graphkit.io> and other GraphKit contributors.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published
// by the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program located at the root of the software package
// in a file called LICENSE. If not, see <http://www.gnu.org/licenses/>.
//
import
UIKit
// font
public
extension
MaterialTheme
{
public
struct
font
{
public
static
var
pointSize
:
CGFloat
=
16
}
}
\ No newline at end of file
Source/MaterialTheme+View.swift
View file @
973a8015
...
...
@@ -33,7 +33,7 @@ public extension MaterialTheme.view {
public
static
let
height
:
CGFloat
=
UIScreen
.
mainScreen
()
.
bounds
.
height
// layer
public
static
let
shadowColor
:
UIColor
=
MaterialTheme
.
blueGrey
.
darken4
public
static
let
shadowColor
:
UIColor
=
MaterialTheme
.
color
.
blueGrey
.
darken4
public
static
let
shadowOffset
:
CGSize
=
CGSizeMake
(
0.2
,
0.2
)
public
static
let
shadowOpacity
:
Float
=
0.5
public
static
let
shadowRadius
:
CGFloat
=
1
...
...
@@ -41,13 +41,14 @@ public extension MaterialTheme.view {
public
static
let
masksToBounds
:
Bool
=
false
// color
public
static
let
backgroudColor
:
UIColor
=
MaterialTheme
.
white
.
color
public
static
let
backgroudColor
:
UIColor
=
MaterialTheme
.
color
.
white
.
base
// interaction
public
static
let
userInteractionEnabled
:
Bool
=
true
// image
public
static
let
imageGravity
:
String
=
kCAGravityCenter
public
static
let
imageContentsRect
:
CGRect
=
CGRectMake
(
0
,
0
,
1
,
1
)
}
// navigation
...
...
@@ -67,7 +68,7 @@ public extension MaterialTheme.navigation {
public
static
let
masksToBounds
:
Bool
=
MaterialTheme
.
view
.
masksToBounds
// color
public
static
let
backgroudColor
:
UIColor
=
MaterialTheme
.
blue
.
accent2
public
static
let
backgroudColor
:
UIColor
=
MaterialTheme
.
color
.
blue
.
accent2
public
static
let
lightContentStatusBar
:
Bool
=
true
// interaction
...
...
@@ -75,5 +76,6 @@ public extension MaterialTheme.navigation {
// image
public
static
let
imageGravity
:
String
=
MaterialTheme
.
view
.
imageGravity
public
static
let
imageContentsRect
:
CGRect
=
MaterialTheme
.
view
.
imageContentsRect
}
Source/MaterialTheme.swift
View file @
973a8015
...
...
@@ -21,7 +21,7 @@ import UIKit
public
struct
MaterialTheme
{}
// spacing
extension
MaterialTheme
{
public
extension
MaterialTheme
{
public
static
var
cardVerticalInset
:
CGFloat
=
16
public
static
var
cardHorizontalInset
:
CGFloat
=
16
...
...
@@ -30,359 +30,4 @@ extension MaterialTheme {
public
static
var
navigationVerticalInset
:
CGFloat
=
8
public
static
var
navigationHorizontalInset
:
CGFloat
=
8
}
// fonts
extension
MaterialTheme
{
public
static
var
textFontSize
:
CGFloat
=
16
}
// colors
extension
MaterialTheme
{
// clear
public
struct
clear
{
public
static
let
color
:
UIColor
=
UIColor
.
clearColor
()
}
// white
public
struct
white
{
public
static
let
color
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
255
/
255
,
blue
:
255
/
255
,
alpha
:
1
)
}
// black
public
struct
black
{
public
static
let
color
:
UIColor
=
UIColor
(
red
:
0
/
255
,
green
:
0
/
255
,
blue
:
0
/
255
,
alpha
:
1
)
}
// red
public
struct
red
{
public
static
let
lighten5
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
235
/
255
,
blue
:
238
/
255
,
alpha
:
1
)
public
static
let
lighten4
:
UIColor
=
UIColor
(
red
:
225
/
255
,
green
:
205
/
255
,
blue
:
210
/
255
,
alpha
:
1
)
public
static
let
lighten3
:
UIColor
=
UIColor
(
red
:
239
/
255
,
green
:
154
/
255
,
blue
:
254
/
255
,
alpha
:
1
)
public
static
let
lighten2
:
UIColor
=
UIColor
(
red
:
229
/
255
,
green
:
115
/
255
,
blue
:
115
/
255
,
alpha
:
1
)
public
static
let
lighten1
:
UIColor
=
UIColor
(
red
:
229
/
255
,
green
:
83
/
255
,
blue
:
80
/
255
,
alpha
:
1
)
public
static
let
color
:
UIColor
=
UIColor
(
red
:
244
/
255
,
green
:
67
/
255
,
blue
:
54
/
255
,
alpha
:
1
)
public
static
let
darken1
:
UIColor
=
UIColor
(
red
:
229
/
255
,
green
:
57
/
255
,
blue
:
53
/
255
,
alpha
:
1
)
public
static
let
darken2
:
UIColor
=
UIColor
(
red
:
211
/
255
,
green
:
47
/
255
,
blue
:
47
/
255
,
alpha
:
1
)
public
static
let
darken3
:
UIColor
=
UIColor
(
red
:
198
/
255
,
green
:
40
/
255
,
blue
:
40
/
255
,
alpha
:
1
)
public
static
let
darken4
:
UIColor
=
UIColor
(
red
:
183
/
255
,
green
:
28
/
255
,
blue
:
28
/
255
,
alpha
:
1
)
public
static
let
accent1
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
138
/
255
,
blue
:
128
/
255
,
alpha
:
1
)
public
static
let
accent2
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
82
/
255
,
blue
:
82
/
255
,
alpha
:
1
)
public
static
let
accent3
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
23
/
255
,
blue
:
68
/
255
,
alpha
:
1
)
public
static
let
accent4
:
UIColor
=
UIColor
(
red
:
213
/
255
,
green
:
0
/
255
,
blue
:
0
/
255
,
alpha
:
1
)
}
// pink
public
struct
pink
{
public
static
let
lighten5
:
UIColor
=
UIColor
(
red
:
252
/
255
,
green
:
228
/
255
,
blue
:
236
/
255
,
alpha
:
1
)
public
static
let
lighten4
:
UIColor
=
UIColor
(
red
:
248
/
255
,
green
:
107
/
255
,
blue
:
208
/
255
,
alpha
:
1
)
public
static
let
lighten3
:
UIColor
=
UIColor
(
red
:
244
/
255
,
green
:
143
/
255
,
blue
:
177
/
255
,
alpha
:
1
)
public
static
let
lighten2
:
UIColor
=
UIColor
(
red
:
240
/
255
,
green
:
98
/
255
,
blue
:
146
/
255
,
alpha
:
1
)
public
static
let
lighten1
:
UIColor
=
UIColor
(
red
:
236
/
255
,
green
:
64
/
255
,
blue
:
122
/
255
,
alpha
:
1
)
public
static
let
color
:
UIColor
=
UIColor
(
red
:
233
/
255
,
green
:
30
/
255
,
blue
:
99
/
255
,
alpha
:
1
)
public
static
let
darken1
:
UIColor
=
UIColor
(
red
:
216
/
255
,
green
:
27
/
255
,
blue
:
96
/
255
,
alpha
:
1
)
public
static
let
darken2
:
UIColor
=
UIColor
(
red
:
194
/
255
,
green
:
24
/
255
,
blue
:
191
/
255
,
alpha
:
1
)
public
static
let
darken3
:
UIColor
=
UIColor
(
red
:
173
/
255
,
green
:
20
/
255
,
blue
:
87
/
255
,
alpha
:
1
)
public
static
let
darken4
:
UIColor
=
UIColor
(
red
:
136
/
255
,
green
:
14
/
255
,
blue
:
79
/
255
,
alpha
:
1
)
public
static
let
accent1
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
128
/
255
,
blue
:
171
/
255
,
alpha
:
1
)
public
static
let
accent2
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
64
/
255
,
blue
:
129
/
255
,
alpha
:
1
)
public
static
let
accent3
:
UIColor
=
UIColor
(
red
:
245
/
255
,
green
:
0
/
255
,
blue
:
87
/
255
,
alpha
:
1
)
public
static
let
accent4
:
UIColor
=
UIColor
(
red
:
197
/
255
,
green
:
17
/
255
,
blue
:
98
/
255
,
alpha
:
1
)
}
// purple
public
struct
purple
{
public
static
let
lighten5
:
UIColor
=
UIColor
(
red
:
243
/
255
,
green
:
229
/
255
,
blue
:
245
/
255
,
alpha
:
1
)
public
static
let
lighten4
:
UIColor
=
UIColor
(
red
:
225
/
255
,
green
:
190
/
255
,
blue
:
231
/
255
,
alpha
:
1
)
public
static
let
lighten3
:
UIColor
=
UIColor
(
red
:
206
/
255
,
green
:
147
/
255
,
blue
:
216
/
255
,
alpha
:
1
)
public
static
let
lighten2
:
UIColor
=
UIColor
(
red
:
186
/
255
,
green
:
104
/
255
,
blue
:
200
/
255
,
alpha
:
1
)
public
static
let
lighten1
:
UIColor
=
UIColor
(
red
:
171
/
255
,
green
:
71
/
255
,
blue
:
188
/
255
,
alpha
:
1
)
public
static
let
color
:
UIColor
=
UIColor
(
red
:
156
/
255
,
green
:
39
/
255
,
blue
:
176
/
255
,
alpha
:
1
)
public
static
let
darken1
:
UIColor
=
UIColor
(
red
:
142
/
255
,
green
:
36
/
255
,
blue
:
170
/
255
,
alpha
:
1
)
public
static
let
darken2
:
UIColor
=
UIColor
(
red
:
123
/
255
,
green
:
31
/
255
,
blue
:
162
/
255
,
alpha
:
1
)
public
static
let
darken3
:
UIColor
=
UIColor
(
red
:
106
/
255
,
green
:
27
/
255
,
blue
:
154
/
255
,
alpha
:
1
)
public
static
let
darken4
:
UIColor
=
UIColor
(
red
:
74
/
255
,
green
:
20
/
255
,
blue
:
140
/
255
,
alpha
:
1
)
public
static
let
accent1
:
UIColor
=
UIColor
(
red
:
234
/
255
,
green
:
128
/
255
,
blue
:
252
/
255
,
alpha
:
1
)
public
static
let
accent2
:
UIColor
=
UIColor
(
red
:
224
/
255
,
green
:
64
/
255
,
blue
:
251
/
255
,
alpha
:
1
)
public
static
let
accent3
:
UIColor
=
UIColor
(
red
:
213
/
255
,
green
:
0
/
255
,
blue
:
249
/
255
,
alpha
:
1
)
public
static
let
accent4
:
UIColor
=
UIColor
(
red
:
170
/
255
,
green
:
0
/
255
,
blue
:
255
/
255
,
alpha
:
1
)
}
// deepPurple
public
struct
deepPurple
{
public
static
let
lighten5
:
UIColor
=
UIColor
(
red
:
237
/
255
,
green
:
231
/
255
,
blue
:
246
/
255
,
alpha
:
1
)
public
static
let
lighten4
:
UIColor
=
UIColor
(
red
:
209
/
255
,
green
:
196
/
255
,
blue
:
233
/
255
,
alpha
:
1
)
public
static
let
lighten3
:
UIColor
=
UIColor
(
red
:
179
/
255
,
green
:
157
/
255
,
blue
:
219
/
255
,
alpha
:
1
)
public
static
let
lighten2
:
UIColor
=
UIColor
(
red
:
149
/
255
,
green
:
117
/
255
,
blue
:
205
/
255
,
alpha
:
1
)
public
static
let
lighten1
:
UIColor
=
UIColor
(
red
:
126
/
255
,
green
:
87
/
255
,
blue
:
194
/
255
,
alpha
:
1
)
public
static
let
color
:
UIColor
=
UIColor
(
red
:
103
/
255
,
green
:
58
/
255
,
blue
:
183
/
255
,
alpha
:
1
)
public
static
let
darken1
:
UIColor
=
UIColor
(
red
:
94
/
255
,
green
:
53
/
255
,
blue
:
177
/
255
,
alpha
:
1
)
public
static
let
darken2
:
UIColor
=
UIColor
(
red
:
81
/
255
,
green
:
45
/
255
,
blue
:
168
/
255
,
alpha
:
1
)
public
static
let
darken3
:
UIColor
=
UIColor
(
red
:
69
/
255
,
green
:
39
/
255
,
blue
:
160
/
255
,
alpha
:
1
)
public
static
let
darken4
:
UIColor
=
UIColor
(
red
:
49
/
255
,
green
:
27
/
255
,
blue
:
146
/
255
,
alpha
:
1
)
public
static
let
accent1
:
UIColor
=
UIColor
(
red
:
179
/
255
,
green
:
136
/
255
,
blue
:
255
/
255
,
alpha
:
1
)
public
static
let
accent2
:
UIColor
=
UIColor
(
red
:
124
/
255
,
green
:
77
/
255
,
blue
:
255
/
255
,
alpha
:
1
)
public
static
let
accent3
:
UIColor
=
UIColor
(
red
:
101
/
255
,
green
:
31
/
255
,
blue
:
255
/
255
,
alpha
:
1
)
public
static
let
accent4
:
UIColor
=
UIColor
(
red
:
98
/
255
,
green
:
0
/
255
,
blue
:
234
/
255
,
alpha
:
1
)
}
// indigo
public
struct
indigo
{
public
static
let
lighten5
:
UIColor
=
UIColor
(
red
:
232
/
255
,
green
:
234
/
255
,
blue
:
246
/
255
,
alpha
:
1
)
public
static
let
lighten4
:
UIColor
=
UIColor
(
red
:
197
/
255
,
green
:
202
/
255
,
blue
:
233
/
255
,
alpha
:
1
)
public
static
let
lighten3
:
UIColor
=
UIColor
(
red
:
159
/
255
,
green
:
168
/
255
,
blue
:
218
/
255
,
alpha
:
1
)
public
static
let
lighten2
:
UIColor
=
UIColor
(
red
:
121
/
255
,
green
:
134
/
255
,
blue
:
203
/
255
,
alpha
:
1
)
public
static
let
lighten1
:
UIColor
=
UIColor
(
red
:
92
/
255
,
green
:
107
/
255
,
blue
:
192
/
255
,
alpha
:
1
)
public
static
let
color
:
UIColor
=
UIColor
(
red
:
63
/
255
,
green
:
81
/
255
,
blue
:
181
/
255
,
alpha
:
1
)
public
static
let
darken1
:
UIColor
=
UIColor
(
red
:
57
/
255
,
green
:
73
/
255
,
blue
:
171
/
255
,
alpha
:
1
)
public
static
let
darken2
:
UIColor
=
UIColor
(
red
:
48
/
255
,
green
:
63
/
255
,
blue
:
159
/
255
,
alpha
:
1
)
public
static
let
darken3
:
UIColor
=
UIColor
(
red
:
40
/
255
,
green
:
53
/
255
,
blue
:
147
/
255
,
alpha
:
1
)
public
static
let
darken4
:
UIColor
=
UIColor
(
red
:
26
/
255
,
green
:
35
/
255
,
blue
:
126
/
255
,
alpha
:
1
)
public
static
let
accent1
:
UIColor
=
UIColor
(
red
:
140
/
255
,
green
:
158
/
255
,
blue
:
255
/
255
,
alpha
:
1
)
public
static
let
accent2
:
UIColor
=
UIColor
(
red
:
83
/
255
,
green
:
109
/
255
,
blue
:
254
/
255
,
alpha
:
1
)
public
static
let
accent3
:
UIColor
=
UIColor
(
red
:
61
/
255
,
green
:
90
/
255
,
blue
:
254
/
255
,
alpha
:
1
)
public
static
let
accent4
:
UIColor
=
UIColor
(
red
:
48
/
255
,
green
:
79
/
255
,
blue
:
254
/
255
,
alpha
:
1
)
}
// blue
public
struct
blue
{
public
static
let
lighten5
:
UIColor
=
UIColor
(
red
:
227
/
255
,
green
:
242
/
255
,
blue
:
253
/
255
,
alpha
:
1
)
public
static
let
lighten4
:
UIColor
=
UIColor
(
red
:
187
/
255
,
green
:
222
/
255
,
blue
:
251
/
255
,
alpha
:
1
)
public
static
let
lighten3
:
UIColor
=
UIColor
(
red
:
144
/
255
,
green
:
202
/
255
,
blue
:
249
/
255
,
alpha
:
1
)
public
static
let
lighten2
:
UIColor
=
UIColor
(
red
:
100
/
255
,
green
:
181
/
255
,
blue
:
246
/
255
,
alpha
:
1
)
public
static
let
lighten1
:
UIColor
=
UIColor
(
red
:
66
/
255
,
green
:
165
/
255
,
blue
:
245
/
255
,
alpha
:
1
)
public
static
let
color
:
UIColor
=
UIColor
(
red
:
33
/
255
,
green
:
150
/
255
,
blue
:
243
/
255
,
alpha
:
1
)
public
static
let
darken1
:
UIColor
=
UIColor
(
red
:
30
/
255
,
green
:
136
/
255
,
blue
:
229
/
255
,
alpha
:
1
)
public
static
let
darken2
:
UIColor
=
UIColor
(
red
:
25
/
255
,
green
:
118
/
255
,
blue
:
210
/
255
,
alpha
:
1
)
public
static
let
darken3
:
UIColor
=
UIColor
(
red
:
21
/
255
,
green
:
101
/
255
,
blue
:
192
/
255
,
alpha
:
1
)
public
static
let
darken4
:
UIColor
=
UIColor
(
red
:
13
/
255
,
green
:
71
/
255
,
blue
:
161
/
255
,
alpha
:
1
)
public
static
let
accent1
:
UIColor
=
UIColor
(
red
:
130
/
255
,
green
:
177
/
255
,
blue
:
255
/
255
,
alpha
:
1
)
public
static
let
accent2
:
UIColor
=
UIColor
(
red
:
68
/
255
,
green
:
138
/
255
,
blue
:
255
/
255
,
alpha
:
1
)
public
static
let
accent3
:
UIColor
=
UIColor
(
red
:
41
/
255
,
green
:
121
/
255
,
blue
:
255
/
255
,
alpha
:
1
)
public
static
let
accent4
:
UIColor
=
UIColor
(
red
:
41
/
255
,
green
:
98
/
255
,
blue
:
255
/
255
,
alpha
:
1
)
}
// light blue
public
struct
lightBlue
{
public
static
let
lighten5
:
UIColor
=
UIColor
(
red
:
225
/
255
,
green
:
245
/
255
,
blue
:
254
/
255
,
alpha
:
1
)
public
static
let
lighten4
:
UIColor
=
UIColor
(
red
:
179
/
255
,
green
:
229
/
255
,
blue
:
252
/
255
,
alpha
:
1
)
public
static
let
lighten3
:
UIColor
=
UIColor
(
red
:
129
/
255
,
green
:
212
/
255
,
blue
:
250
/
255
,
alpha
:
1
)
public
static
let
lighten2
:
UIColor
=
UIColor
(
red
:
79
/
255
,
green
:
195
/
255
,
blue
:
247
/
255
,
alpha
:
1
)
public
static
let
lighten1
:
UIColor
=
UIColor
(
red
:
41
/
255
,
green
:
182
/
255
,
blue
:
246
/
255
,
alpha
:
1
)
public
static
let
color
:
UIColor
=
UIColor
(
red
:
3
/
255
,
green
:
169
/
255
,
blue
:
244
/
255
,
alpha
:
1
)
public
static
let
darken1
:
UIColor
=
UIColor
(
red
:
3
/
255
,
green
:
155
/
255
,
blue
:
229
/
255
,
alpha
:
1
)
public
static
let
darken2
:
UIColor
=
UIColor
(
red
:
2
/
255
,
green
:
136
/
255
,
blue
:
209
/
255
,
alpha
:
1
)
public
static
let
darken3
:
UIColor
=
UIColor
(
red
:
2
/
255
,
green
:
119
/
255
,
blue
:
189
/
255
,
alpha
:
1
)
public
static
let
darken4
:
UIColor
=
UIColor
(
red
:
1
/
255
,
green
:
87
/
255
,
blue
:
155
/
255
,
alpha
:
1
)
public
static
let
accent1
:
UIColor
=
UIColor
(
red
:
128
/
255
,
green
:
216
/
255
,
blue
:
255
/
255
,
alpha
:
1
)
public
static
let
accent2
:
UIColor
=
UIColor
(
red
:
64
/
255
,
green
:
196
/
255
,
blue
:
255
/
255
,
alpha
:
1
)
public
static
let
accent3
:
UIColor
=
UIColor
(
red
:
0
/
255
,
green
:
176
/
255
,
blue
:
255
/
255
,
alpha
:
1
)
public
static
let
accent4
:
UIColor
=
UIColor
(
red
:
0
/
255
,
green
:
145
/
255
,
blue
:
234
/
255
,
alpha
:
1
)
}
// cyan
public
struct
cyab
{
public
static
let
lighten5
:
UIColor
=
UIColor
(
red
:
224
/
255
,
green
:
247
/
255
,
blue
:
250
/
255
,
alpha
:
1
)
public
static
let
lighten4
:
UIColor
=
UIColor
(
red
:
1178
/
255
,
green
:
235
/
255
,
blue
:
242
/
255
,
alpha
:
1
)
public
static
let
lighten3
:
UIColor
=
UIColor
(
red
:
128
/
255
,
green
:
222
/
255
,
blue
:
2343
/
255
,
alpha
:
1
)
public
static
let
lighten2
:
UIColor
=
UIColor
(
red
:
77
/
255
,
green
:
208
/
255
,
blue
:
225
/
255
,
alpha
:
1
)
public
static
let
lighten1
:
UIColor
=
UIColor
(
red
:
38
/
255
,
green
:
198
/
255
,
blue
:
218
/
255
,
alpha
:
1
)
public
static
let
color
:
UIColor
=
UIColor
(
red
:
0
/
255
,
green
:
188
/
255
,
blue
:
212
/
255
,
alpha
:
1
)
public
static
let
darken1
:
UIColor
=
UIColor
(
red
:
0
/
255
,
green
:
172
/
255
,
blue
:
193
/
255
,
alpha
:
1
)
public
static
let
darken2
:
UIColor
=
UIColor
(
red
:
0
/
255
,
green
:
151
/
255
,
blue
:
167
/
255
,
alpha
:
1
)
public
static
let
darken3
:
UIColor
=
UIColor
(
red
:
0
/
255
,
green
:
131
/
255
,
blue
:
143
/
255
,
alpha
:
1
)
public
static
let
darken4
:
UIColor
=
UIColor
(
red
:
0
/
255
,
green
:
96
/
255
,
blue
:
100
/
255
,
alpha
:
1
)
public
static
let
accent1
:
UIColor
=
UIColor
(
red
:
132
/
255
,
green
:
255
/
255
,
blue
:
255
/
255
,
alpha
:
1
)
public
static
let
accent2
:
UIColor
=
UIColor
(
red
:
24
/
255
,
green
:
255
/
255
,
blue
:
255
/
255
,
alpha
:
1
)
public
static
let
accent3
:
UIColor
=
UIColor
(
red
:
0
/
255
,
green
:
229
/
255
,
blue
:
255
/
255
,
alpha
:
1
)
public
static
let
accent4
:
UIColor
=
UIColor
(
red
:
0
/
255
,
green
:
184
/
255
,
blue
:
212
/
255
,
alpha
:
1
)
}
// teal
public
struct
teal
{
public
static
let
lighten5
:
UIColor
=
UIColor
(
red
:
224
/
255
,
green
:
242
/
255
,
blue
:
241
/
255
,
alpha
:
1
)
public
static
let
lighten4
:
UIColor
=
UIColor
(
red
:
178
/
255
,
green
:
223
/
255
,
blue
:
219
/
255
,
alpha
:
1
)
public
static
let
lighten3
:
UIColor
=
UIColor
(
red
:
128
/
255
,
green
:
203
/
255
,
blue
:
196
/
255
,
alpha
:
1
)
public
static
let
lighten2
:
UIColor
=
UIColor
(
red
:
77
/
255
,
green
:
182
/
255
,
blue
:
172
/
255
,
alpha
:
1
)
public
static
let
lighten1
:
UIColor
=
UIColor
(
red
:
38
/
255
,
green
:
166
/
255
,
blue
:
154
/
255
,
alpha
:
1
)
public
static
let
color
:
UIColor
=
UIColor
(
red
:
0
/
255
,
green
:
150
/
255
,
blue
:
136
/
255
,
alpha
:
1
)
public
static
let
darken1
:
UIColor
=
UIColor
(
red
:
0
/
255
,
green
:
137
/
255
,
blue
:
123
/
255
,
alpha
:
1
)
public
static
let
darken2
:
UIColor
=
UIColor
(
red
:
0
/
255
,
green
:
121
/
255
,
blue
:
107
/
255
,
alpha
:
1
)
public
static
let
darken3
:
UIColor
=
UIColor
(
red
:
0
/
255
,
green
:
105
/
255
,
blue
:
92
/
255
,
alpha
:
1
)
public
static
let
darken4
:
UIColor
=
UIColor
(
red
:
0
/
255
,
green
:
77
/
255
,
blue
:
64
/
255
,
alpha
:
1
)
public
static
let
accent1
:
UIColor
=
UIColor
(
red
:
167
/
255
,
green
:
255
/
255
,
blue
:
235
/
255
,
alpha
:
1
)
public
static
let
accent2
:
UIColor
=
UIColor
(
red
:
100
/
255
,
green
:
255
/
255
,
blue
:
218
/
255
,
alpha
:
1
)
public
static
let
accent3
:
UIColor
=
UIColor
(
red
:
29
/
255
,
green
:
133
/
255
,
blue
:
182
/
255
,
alpha
:
1
)
public
static
let
accent4
:
UIColor
=
UIColor
(
red
:
0
/
255
,
green
:
191
/
255
,
blue
:
165
/
255
,
alpha
:
1
)
}
// green
public
struct
green
{
public
static
let
lighten5
:
UIColor
=
UIColor
(
red
:
232
/
255
,
green
:
245
/
255
,
blue
:
233
/
255
,
alpha
:
1
)
public
static
let
lighten4
:
UIColor
=
UIColor
(
red
:
200
/
255
,
green
:
230
/
255
,
blue
:
201
/
255
,
alpha
:
1
)
public
static
let
lighten3
:
UIColor
=
UIColor
(
red
:
165
/
255
,
green
:
214
/
255
,
blue
:
167
/
255
,
alpha
:
1
)
public
static
let
lighten2
:
UIColor
=
UIColor
(
red
:
129
/
255
,
green
:
199
/
255
,
blue
:
132
/
255
,
alpha
:
1
)
public
static
let
lighten1
:
UIColor
=
UIColor
(
red
:
102
/
255
,
green
:
187
/
255
,
blue
:
106
/
255
,
alpha
:
1
)
public
static
let
color
:
UIColor
=
UIColor
(
red
:
76
/
255
,
green
:
175
/
255
,
blue
:
80
/
255
,
alpha
:
1
)
public
static
let
darken1
:
UIColor
=
UIColor
(
red
:
67
/
255
,
green
:
160
/
255
,
blue
:
71
/
255
,
alpha
:
1
)
public
static
let
darken2
:
UIColor
=
UIColor
(
red
:
56
/
255
,
green
:
142
/
255
,
blue
:
60
/
255
,
alpha
:
1
)
public
static
let
darken3
:
UIColor
=
UIColor
(
red
:
46
/
255
,
green
:
125
/
255
,
blue
:
50
/
255
,
alpha
:
1
)
public
static
let
darken4
:
UIColor
=
UIColor
(
red
:
27
/
255
,
green
:
94
/
255
,
blue
:
32
/
255
,
alpha
:
1
)
public
static
let
accent1
:
UIColor
=
UIColor
(
red
:
185
/
255
,
green
:
246
/
255
,
blue
:
202
/
255
,
alpha
:
1
)
public
static
let
accent2
:
UIColor
=
UIColor
(
red
:
105
/
255
,
green
:
240
/
255
,
blue
:
174
/
255
,
alpha
:
1
)
public
static
let
accent3
:
UIColor
=
UIColor
(
red
:
0
/
255
,
green
:
230
/
255
,
blue
:
118
/
255
,
alpha
:
1
)
public
static
let
accent4
:
UIColor
=
UIColor
(
red
:
0
/
255
,
green
:
200
/
255
,
blue
:
83
/
255
,
alpha
:
1
)
}
// light green
public
struct
lightGreen
{
public
static
let
lighten5
:
UIColor
=
UIColor
(
red
:
241
/
255
,
green
:
248
/
255
,
blue
:
233
/
255
,
alpha
:
1
)
public
static
let
lighten4
:
UIColor
=
UIColor
(
red
:
220
/
255
,
green
:
237
/
255
,
blue
:
200
/
255
,
alpha
:
1
)
public
static
let
lighten3
:
UIColor
=
UIColor
(
red
:
197
/
255
,
green
:
225
/
255
,
blue
:
165
/
255
,
alpha
:
1
)
public
static
let
lighten2
:
UIColor
=
UIColor
(
red
:
174
/
255
,
green
:
213
/
255
,
blue
:
129
/
255
,
alpha
:
1
)
public
static
let
lighten1
:
UIColor
=
UIColor
(
red
:
156
/
255
,
green
:
204
/
255
,
blue
:
101
/
255
,
alpha
:
1
)
public
static
let
color
:
UIColor
=
UIColor
(
red
:
139
/
255
,
green
:
195
/
255
,
blue
:
74
/
255
,
alpha
:
1
)
public
static
let
darken1
:
UIColor
=
UIColor
(
red
:
124
/
255
,
green
:
179
/
255
,
blue
:
66
/
255
,
alpha
:
1
)
public
static
let
darken2
:
UIColor
=
UIColor
(
red
:
104
/
255
,
green
:
159
/
255
,
blue
:
56
/
255
,
alpha
:
1
)
public
static
let
darken3
:
UIColor
=
UIColor
(
red
:
85
/
255
,
green
:
139
/
255
,
blue
:
47
/
255
,
alpha
:
1
)
public
static
let
darken4
:
UIColor
=
UIColor
(
red
:
51
/
255
,
green
:
105
/
255
,
blue
:
30
/
255
,
alpha
:
1
)
public
static
let
accent1
:
UIColor
=
UIColor
(
red
:
204
/
255
,
green
:
255
/
255
,
blue
:
144
/
255
,
alpha
:
1
)
public
static
let
accent2
:
UIColor
=
UIColor
(
red
:
178
/
255
,
green
:
255
/
255
,
blue
:
89
/
255
,
alpha
:
1
)
public
static
let
accent3
:
UIColor
=
UIColor
(
red
:
118
/
255
,
green
:
255
/
255
,
blue
:
3
/
255
,
alpha
:
1
)
public
static
let
accent4
:
UIColor
=
UIColor
(
red
:
100
/
255
,
green
:
221
/
255
,
blue
:
23
/
255
,
alpha
:
1
)
}
// lime
public
struct
lime
{
public
static
let
lighten5
:
UIColor
=
UIColor
(
red
:
249
/
255
,
green
:
251
/
255
,
blue
:
231
/
255
,
alpha
:
1
)
public
static
let
lighten4
:
UIColor
=
UIColor
(
red
:
240
/
255
,
green
:
244
/
255
,
blue
:
195
/
255
,
alpha
:
1
)
public
static
let
lighten3
:
UIColor
=
UIColor
(
red
:
230
/
255
,
green
:
238
/
255
,
blue
:
156
/
255
,
alpha
:
1
)
public
static
let
lighten2
:
UIColor
=
UIColor
(
red
:
220
/
255
,
green
:
231
/
255
,
blue
:
117
/
255
,
alpha
:
1
)
public
static
let
lighten1
:
UIColor
=
UIColor
(
red
:
212
/
255
,
green
:
225
/
255
,
blue
:
87
/
255
,
alpha
:
1
)
public
static
let
color
:
UIColor
=
UIColor
(
red
:
205
/
255
,
green
:
220
/
255
,
blue
:
57
/
255
,
alpha
:
1
)
public
static
let
darken1
:
UIColor
=
UIColor
(
red
:
192
/
255
,
green
:
202
/
255
,
blue
:
51
/
255
,
alpha
:
1
)
public
static
let
darken2
:
UIColor
=
UIColor
(
red
:
175
/
255
,
green
:
180
/
255
,
blue
:
43
/
255
,
alpha
:
1
)
public
static
let
darken3
:
UIColor
=
UIColor
(
red
:
158
/
255
,
green
:
157
/
255
,
blue
:
36
/
255
,
alpha
:
1
)
public
static
let
darken4
:
UIColor
=
UIColor
(
red
:
130
/
255
,
green
:
119
/
255
,
blue
:
23
/
255
,
alpha
:
1
)
public
static
let
accent1
:
UIColor
=
UIColor
(
red
:
244
/
255
,
green
:
255
/
255
,
blue
:
129
/
255
,
alpha
:
1
)
public
static
let
accent2
:
UIColor
=
UIColor
(
red
:
238
/
255
,
green
:
255
/
255
,
blue
:
65
/
255
,
alpha
:
1
)
public
static
let
accent3
:
UIColor
=
UIColor
(
red
:
198
/
255
,
green
:
255
/
255
,
blue
:
0
/
255
,
alpha
:
1
)
public
static
let
accent4
:
UIColor
=
UIColor
(
red
:
174
/
255
,
green
:
234
/
255
,
blue
:
0
/
255
,
alpha
:
1
)
}
// yellow
public
struct
yellow
{
public
static
let
lighten5
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
253
/
255
,
blue
:
231
/
255
,
alpha
:
1
)
public
static
let
lighten4
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
249
/
255
,
blue
:
196
/
255
,
alpha
:
1
)
public
static
let
lighten3
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
245
/
255
,
blue
:
157
/
255
,
alpha
:
1
)
public
static
let
lighten2
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
241
/
255
,
blue
:
118
/
255
,
alpha
:
1
)
public
static
let
lighten1
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
238
/
255
,
blue
:
88
/
255
,
alpha
:
1
)
public
static
let
color
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
235
/
255
,
blue
:
59
/
255
,
alpha
:
1
)
public
static
let
darken1
:
UIColor
=
UIColor
(
red
:
253
/
255
,
green
:
216
/
255
,
blue
:
53
/
255
,
alpha
:
1
)
public
static
let
darken2
:
UIColor
=
UIColor
(
red
:
251
/
255
,
green
:
192
/
255
,
blue
:
45
/
255
,
alpha
:
1
)
public
static
let
darken3
:
UIColor
=
UIColor
(
red
:
249
/
255
,
green
:
168
/
255
,
blue
:
37
/
255
,
alpha
:
1
)
public
static
let
darken4
:
UIColor
=
UIColor
(
red
:
245
/
255
,
green
:
127
/
255
,
blue
:
23
/
255
,
alpha
:
1
)
public
static
let
accent1
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
255
/
255
,
blue
:
141
/
255
,
alpha
:
1
)
public
static
let
accent2
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
255
/
255
,
blue
:
0
/
255
,
alpha
:
1
)
public
static
let
accent3
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
234
/
255
,
blue
:
0
/
255
,
alpha
:
1
)
public
static
let
accent4
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
214
/
255
,
blue
:
0
/
255
,
alpha
:
1
)
}
// amber
public
struct
amber
{
public
static
let
lighten5
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
248
/
255
,
blue
:
225
/
255
,
alpha
:
1
)
public
static
let
lighten4
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
236
/
255
,
blue
:
179
/
255
,
alpha
:
1
)
public
static
let
lighten3
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
224
/
255
,
blue
:
130
/
255
,
alpha
:
1
)
public
static
let
lighten2
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
213
/
255
,
blue
:
79
/
255
,
alpha
:
1
)
public
static
let
lighten1
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
202
/
255
,
blue
:
40
/
255
,
alpha
:
1
)
public
static
let
color
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
193
/
255
,
blue
:
7
/
255
,
alpha
:
1
)
public
static
let
darken1
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
179
/
255
,
blue
:
0
/
255
,
alpha
:
1
)
public
static
let
darken2
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
160
/
255
,
blue
:
0
/
255
,
alpha
:
1
)
public
static
let
darken3
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
143
/
255
,
blue
:
0
/
255
,
alpha
:
1
)
public
static
let
darken4
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
111
/
255
,
blue
:
0
/
255
,
alpha
:
1
)
public
static
let
accent1
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
229
/
255
,
blue
:
127
/
255
,
alpha
:
1
)
public
static
let
accent2
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
215
/
255
,
blue
:
64
/
255
,
alpha
:
1
)
public
static
let
accent3
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
196
/
255
,
blue
:
0
/
255
,
alpha
:
1
)
public
static
let
accent4
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
171
/
255
,
blue
:
0
/
255
,
alpha
:
1
)
}
// orange
public
struct
orange
{
public
static
let
lighten5
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
243
/
255
,
blue
:
224
/
255
,
alpha
:
1
)
public
static
let
lighten4
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
224
/
255
,
blue
:
178
/
255
,
alpha
:
1
)
public
static
let
lighten3
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
204
/
255
,
blue
:
128
/
255
,
alpha
:
1
)
public
static
let
lighten2
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
183
/
255
,
blue
:
77
/
255
,
alpha
:
1
)
public
static
let
lighten1
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
167
/
255
,
blue
:
38
/
255
,
alpha
:
1
)
public
static
let
color
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
152
/
255
,
blue
:
0
/
255
,
alpha
:
1
)
public
static
let
darken1
:
UIColor
=
UIColor
(
red
:
251
/
255
,
green
:
140
/
255
,
blue
:
0
/
255
,
alpha
:
1
)
public
static
let
darken2
:
UIColor
=
UIColor
(
red
:
245
/
255
,
green
:
124
/
255
,
blue
:
0
/
255
,
alpha
:
1
)
public
static
let
darken3
:
UIColor
=
UIColor
(
red
:
239
/
255
,
green
:
108
/
255
,
blue
:
0
/
255
,
alpha
:
1
)
public
static
let
darken4
:
UIColor
=
UIColor
(
red
:
230
/
255
,
green
:
81
/
255
,
blue
:
0
/
255
,
alpha
:
1
)
public
static
let
accent1
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
209
/
255
,
blue
:
128
/
255
,
alpha
:
1
)
public
static
let
accent2
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
171
/
255
,
blue
:
64
/
255
,
alpha
:
1
)
public
static
let
accent3
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
145
/
255
,
blue
:
0
/
255
,
alpha
:
1
)
public
static
let
accent4
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
109
/
255
,
blue
:
0
/
255
,
alpha
:
1
)
}
// deep orange
public
struct
deepOrange
{
public
static
let
lighten5
:
UIColor
=
UIColor
(
red
:
251
/
255
,
green
:
233
/
255
,
blue
:
231
/
255
,
alpha
:
1
)
public
static
let
lighten4
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
204
/
255
,
blue
:
188
/
255
,
alpha
:
1
)
public
static
let
lighten3
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
171
/
255
,
blue
:
145
/
255
,
alpha
:
1
)
public
static
let
lighten2
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
138
/
255
,
blue
:
101
/
255
,
alpha
:
1
)
public
static
let
lighten1
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
112
/
255
,
blue
:
67
/
255
,
alpha
:
1
)
public
static
let
color
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
87
/
255
,
blue
:
34
/
255
,
alpha
:
1
)
public
static
let
darken1
:
UIColor
=
UIColor
(
red
:
244
/
255
,
green
:
81
/
255
,
blue
:
30
/
255
,
alpha
:
1
)
public
static
let
darken2
:
UIColor
=
UIColor
(
red
:
230
/
255
,
green
:
74
/
255
,
blue
:
25
/
255
,
alpha
:
1
)
public
static
let
darken3
:
UIColor
=
UIColor
(
red
:
216
/
255
,
green
:
67
/
255
,
blue
:
21
/
255
,
alpha
:
1
)
public
static
let
darken4
:
UIColor
=
UIColor
(
red
:
191
/
255
,
green
:
54
/
255
,
blue
:
12
/
255
,
alpha
:
1
)
public
static
let
accent1
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
158
/
255
,
blue
:
128
/
255
,
alpha
:
1
)
public
static
let
accent2
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
110
/
255
,
blue
:
64
/
255
,
alpha
:
1
)
public
static
let
accent3
:
UIColor
=
UIColor
(
red
:
255
/
255
,
green
:
61
/
255
,
blue
:
0
/
255
,
alpha
:
1
)
public
static
let
accent4
:
UIColor
=
UIColor
(
red
:
221
/
255
,
green
:
44
/
255
,
blue
:
0
/
255
,
alpha
:
1
)
}
// brown
public
struct
brown
{
public
static
let
lighten5
:
UIColor
=
UIColor
(
red
:
239
/
255
,
green
:
235
/
255
,
blue
:
233
/
255
,
alpha
:
1
)
public
static
let
lighten4
:
UIColor
=
UIColor
(
red
:
215
/
255
,
green
:
204
/
255
,
blue
:
200
/
255
,
alpha
:
1
)
public
static
let
lighten3
:
UIColor
=
UIColor
(
red
:
188
/
255
,
green
:
170
/
255
,
blue
:
164
/
255
,
alpha
:
1
)
public
static
let
lighten2
:
UIColor
=
UIColor
(
red
:
161
/
255
,
green
:
136
/
255
,
blue
:
127
/
255
,
alpha
:
1
)
public
static
let
lighten1
:
UIColor
=
UIColor
(
red
:
141
/
255
,
green
:
110
/
255
,
blue
:
99
/
255
,
alpha
:
1
)
public
static
let
color
:
UIColor
=
UIColor
(
red
:
121
/
255
,
green
:
85
/
255
,
blue
:
72
/
255
,
alpha
:
1
)
public
static
let
darken1
:
UIColor
=
UIColor
(
red
:
109
/
255
,
green
:
76
/
255
,
blue
:
65
/
255
,
alpha
:
1
)
public
static
let
darken2
:
UIColor
=
UIColor
(
red
:
93
/
255
,
green
:
64
/
255
,
blue
:
55
/
255
,
alpha
:
1
)
public
static
let
darken3
:
UIColor
=
UIColor
(
red
:
78
/
255
,
green
:
52
/
255
,
blue
:
46
/
255
,
alpha
:
1
)
public
static
let
darken4
:
UIColor
=
UIColor
(
red
:
62
/
255
,
green
:
39
/
255
,
blue
:
35
/
255
,
alpha
:
1
)
}
// grey
public
struct
grey
{
public
static
let
lighten5
:
UIColor
=
UIColor
(
red
:
250
/
255
,
green
:
250
/
255
,
blue
:
250
/
255
,
alpha
:
1
)
public
static
let
lighten4
:
UIColor
=
UIColor
(
red
:
245
/
255
,
green
:
245
/
255
,
blue
:
245
/
255
,
alpha
:
1
)
public
static
let
lighten3
:
UIColor
=
UIColor
(
red
:
238
/
255
,
green
:
238
/
255
,
blue
:
238
/
255
,
alpha
:
1
)
public
static
let
lighten2
:
UIColor
=
UIColor
(
red
:
224
/
255
,
green
:
224
/
255
,
blue
:
224
/
255
,
alpha
:
1
)
public
static
let
lighten1
:
UIColor
=
UIColor
(
red
:
189
/
255
,
green
:
189
/
255
,
blue
:
189
/
255
,
alpha
:
1
)
public
static
let
color
:
UIColor
=
UIColor
(
red
:
158
/
255
,
green
:
158
/
255
,
blue
:
158
/
255
,
alpha
:
1
)
public
static
let
darken1
:
UIColor
=
UIColor
(
red
:
117
/
255
,
green
:
117
/
255
,
blue
:
117
/
255
,
alpha
:
1
)
public
static
let
darken2
:
UIColor
=
UIColor
(
red
:
97
/
255
,
green
:
97
/
255
,
blue
:
97
/
255
,
alpha
:
1
)
public
static
let
darken3
:
UIColor
=
UIColor
(
red
:
66
/
255
,
green
:
66
/
255
,
blue
:
66
/
255
,
alpha
:
1
)
public
static
let
darken4
:
UIColor
=
UIColor
(
red
:
33
/
255
,
green
:
33
/
255
,
blue
:
33
/
255
,
alpha
:
1
)
}
// blue grey
public
struct
blueGrey
{
public
static
let
lighten5
:
UIColor
=
UIColor
(
red
:
236
/
255
,
green
:
239
/
255
,
blue
:
241
/
255
,
alpha
:
1
)
public
static
let
lighten4
:
UIColor
=
UIColor
(
red
:
207
/
255
,
green
:
216
/
255
,
blue
:
220
/
255
,
alpha
:
1
)
public
static
let
lighten3
:
UIColor
=
UIColor
(
red
:
176
/
255
,
green
:
190
/
255
,
blue
:
197
/
255
,
alpha
:
1
)
public
static
let
lighten2
:
UIColor
=
UIColor
(
red
:
144
/
255
,
green
:
164
/
255
,
blue
:
174
/
255
,
alpha
:
1
)
public
static
let
lighten1
:
UIColor
=
UIColor
(
red
:
120
/
255
,
green
:
144
/
255
,
blue
:
156
/
255
,
alpha
:
1
)
public
static
let
color
:
UIColor
=
UIColor
(
red
:
96
/
255
,
green
:
125
/
255
,
blue
:
139
/
255
,
alpha
:
1
)
public
static
let
darken1
:
UIColor
=
UIColor
(
red
:
84
/
255
,
green
:
110
/
255
,
blue
:
122
/
255
,
alpha
:
1
)
public
static
let
darken2
:
UIColor
=
UIColor
(
red
:
69
/
255
,
green
:
90
/
255
,
blue
:
100
/
255
,
alpha
:
1
)
public
static
let
darken3
:
UIColor
=
UIColor
(
red
:
55
/
255
,
green
:
71
/
255
,
blue
:
79
/
255
,
alpha
:
1
)
public
static
let
darken4
:
UIColor
=
UIColor
(
red
:
38
/
255
,
green
:
50
/
255
,
blue
:
56
/
255
,
alpha
:
1
)
}
}
}
\ No newline at end of file
Source/MaterialView.swift
View file @
973a8015
...
...
@@ -19,6 +19,7 @@
import
UIKit
public
class
MaterialView
:
UIView
{
/**
:name: image
*/
...
...
@@ -33,7 +34,16 @@ public class MaterialView: UIView {
*/
public
var
imageGravity
:
String
?
{
didSet
{
layer
.
contentsGravity
=
nil
==
imageGravity
?
MaterialTheme
.
navigation
.
imageGravity
:
imageGravity
!
layer
.
contentsGravity
=
nil
==
imageGravity
?
MaterialTheme
.
view
.
imageGravity
:
imageGravity
!
}
}
/**
:name: imageContentsRect
*/
public
var
imageContentsRect
:
CGRect
?
{
didSet
{
layer
.
contentsRect
=
nil
==
imageContentsRect
?
MaterialTheme
.
view
.
imageContentsRect
:
imageContentsRect
!
}
}
...
...
@@ -142,6 +152,9 @@ public class MaterialView: UIView {
*/
public
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
prepareView
()
prepareLayer
()
prepareBounds
()
}
/**
...
...
@@ -150,8 +163,8 @@ public class MaterialView: UIView {
public
convenience
init
()
{
self
.
init
(
frame
:
CGRectMake
(
MaterialTheme
.
view
.
x
,
MaterialTheme
.
view
.
y
,
MaterialTheme
.
view
.
width
,
MaterialTheme
.
view
.
height
))
prepareView
()
prepareFrame
()
prepareLayer
()
prepareBounds
()
}
/**
...
...
@@ -163,13 +176,13 @@ public class MaterialView: UIView {
}
/**
:name: prepare
Frame
:name: prepare
Bounds
*/
internal
func
prepare
Frame
()
{
x
=
frame
.
origin
.
x
y
=
frame
.
origin
.
y
width
=
frame
.
size
.
width
height
=
frame
.
size
.
height
internal
func
prepare
Bounds
()
{
self
.
x
=
frame
.
origin
.
x
self
.
y
=
frame
.
origin
.
y
self
.
width
=
frame
.
size
.
width
self
.
height
=
frame
.
size
.
height
}
/**
...
...
Source/NavigationBarView.swift
View file @
973a8015
...
...
@@ -29,13 +29,31 @@ public class NavigationBarView: MaterialView {
}
/**
:name: imageGravity
*/
public
override
var
imageGravity
:
String
?
{
didSet
{
layer
.
contentsGravity
=
nil
==
imageGravity
?
MaterialTheme
.
navigation
.
imageGravity
:
imageGravity
!
}
}
/**
:name: imageContentsRect
*/
public
override
var
imageContentsRect
:
CGRect
?
{
didSet
{
layer
.
contentsRect
=
nil
==
imageContentsRect
?
MaterialTheme
.
navigation
.
imageContentsRect
:
imageContentsRect
!
}
}
/**
:name: init
*/
public
convenience
init
()
{
self
.
init
(
frame
:
CGRectMake
(
MaterialTheme
.
navigation
.
x
,
MaterialTheme
.
navigation
.
y
,
MaterialTheme
.
navigation
.
width
,
MaterialTheme
.
navigation
.
height
))
prepareView
()
prepareFrame
()
prepareLayer
()
prepareBounds
()
}
/**
...
...
Source/RaisedButton.swift
View file @
973a8015
...
...
@@ -25,8 +25,8 @@ public class RaisedButton : MaterialButton {
internal
override
func
prepareView
()
{
super
.
prepareView
()
titleLabel
!.
font
=
Roboto
.
regular
setTitleColor
(
MaterialTheme
.
white
.
color
,
forState
:
.
Normal
)
backgroundColor
=
MaterialTheme
.
blue
.
accent2
setTitleColor
(
MaterialTheme
.
color
.
white
.
base
,
forState
:
.
Normal
)
backgroundColor
=
MaterialTheme
.
color
.
blue
.
accent2
contentEdgeInsets
=
UIEdgeInsetsMake
(
MaterialTheme
.
buttonVerticalInset
,
MaterialTheme
.
buttonHorizontalInset
,
MaterialTheme
.
buttonVerticalInset
,
MaterialTheme
.
buttonHorizontalInset
)
}
...
...
Source/Roboto.swift
View file @
973a8015
...
...
@@ -23,7 +23,7 @@ public struct Roboto {
:name: thin
*/
public
static
var
thin
:
UIFont
{
return
thinWithSize
(
MaterialTheme
.
textFo
ntSize
)
return
thinWithSize
(
MaterialTheme
.
font
.
poi
ntSize
)
}
/**
...
...
@@ -40,7 +40,7 @@ public struct Roboto {
:name: light
*/
public
static
var
light
:
UIFont
{
return
lightWithSize
(
MaterialTheme
.
textFo
ntSize
)
return
lightWithSize
(
MaterialTheme
.
font
.
poi
ntSize
)
}
/**
...
...
@@ -57,7 +57,7 @@ public struct Roboto {
:name: regular
*/
public
static
var
regular
:
UIFont
{
return
regularWithSize
(
MaterialTheme
.
textFo
ntSize
)
return
regularWithSize
(
MaterialTheme
.
font
.
poi
ntSize
)
}
/**
...
...
@@ -74,7 +74,7 @@ public struct Roboto {
:name: medium
*/
public
static
var
medium
:
UIFont
{
return
mediumWithSize
(
MaterialTheme
.
textFo
ntSize
)
return
mediumWithSize
(
MaterialTheme
.
font
.
poi
ntSize
)
}
/**
...
...
@@ -91,7 +91,7 @@ public struct Roboto {
:name: bold
*/
public
static
var
bold
:
UIFont
{
return
boldWithSize
(
MaterialTheme
.
textFo
ntSize
)
return
boldWithSize
(
MaterialTheme
.
font
.
poi
ntSize
)
}
/**
...
...
Source/SideNavigationViewController.swift
View file @
973a8015
...
...
@@ -136,7 +136,7 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer
public
static
var
hideStatusBar
:
Bool
=
true
public
static
var
horizontalThreshold
:
CGFloat
=
defaultOptions
.
threshold
public
static
var
verticalThreshold
:
CGFloat
=
defaultOptions
.
threshold
public
static
var
backdropBackgroundColor
:
UIColor
=
MaterialTheme
.
black
.
color
public
static
var
backdropBackgroundColor
:
UIColor
=
MaterialTheme
.
color
.
black
.
base
public
static
var
animationDuration
:
CGFloat
=
defaultOptions
.
defaultAnimationDuration
public
static
var
leftBezelWidth
:
CGFloat
=
defaultOptions
.
bezelWidth
public
static
var
leftViewContainerWidth
:
CGFloat
=
defaultOptions
.
containerWidth
...
...
@@ -1242,7 +1242,7 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer
//
private
func
prepareMainContainer
()
{
mainViewContainer
=
UIView
(
frame
:
view
.
bounds
)
mainViewContainer
!.
backgroundColor
=
MaterialTheme
.
c
lear
.
color
mainViewContainer
!.
backgroundColor
=
MaterialTheme
.
c
olor
.
clear
.
base
mainViewContainer
!.
autoresizingMask
=
[
.
FlexibleHeight
,
.
FlexibleWidth
]
view
.
addSubview
(
mainViewContainer
!
)
}
...
...
@@ -1301,7 +1301,7 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer
b
.
origin
.
x
=
originX
b
.
origin
.
y
=
originY
viewContainer
=
UIView
(
frame
:
b
)
viewContainer
!.
backgroundColor
=
MaterialTheme
.
c
lear
.
color
viewContainer
!.
backgroundColor
=
MaterialTheme
.
c
olor
.
clear
.
base
viewContainer
!.
autoresizingMask
=
.
FlexibleHeight
view
.
addSubview
(
viewContainer
!
)
}
...
...
Source/TextView.swift
View file @
973a8015
...
...
@@ -62,7 +62,7 @@ public class TextView: UITextView {
p
.
font
=
font
p
.
textAlignment
=
textAlignment
p
.
numberOfLines
=
0
p
.
backgroundColor
=
MaterialTheme
.
c
lear
.
color
p
.
backgroundColor
=
MaterialTheme
.
c
olor
.
clear
.
base
addSubview
(
p
)
updateLabelConstraints
()
textViewTextDidChange
()
...
...
@@ -124,7 +124,7 @@ public class TextView: UITextView {
// label needs to be added to the view
// hierarchy before setting insets
textContainerInset
=
UIEdgeInsetsMake
(
16
,
16
,
16
,
16
)
backgroundColor
=
MaterialTheme
.
c
lear
.
color
backgroundColor
=
MaterialTheme
.
c
olor
.
clear
.
base
NSNotificationCenter
.
defaultCenter
()
.
addObserver
(
self
,
selector
:
"textViewTextDidChange"
,
name
:
UITextViewTextDidChangeNotification
,
object
:
nil
)
updateLabelConstraints
()
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment