A UIColor extension with CSS3 Color names.

Overview

CSS3ColorsSwift

License Language Carthage compatible CocoaPods compatible Awesome

Overview

CSS3ColorsSwift provides a UIColor extension with Web Color names.

uicolor_extension screenshot

Demo

Run the demo project in the Demo directory without carthage update or pod install.

Usage

You can write Web Color as described below:

let color1 = UIColor.ivory

let color2: UIColor = .mediumSlateBlue

view.backgroundColor = .lightCoral

You can see also all colors in Demo project.

Property Color
.whiteSmoke #F5F5F5
.ghostWhite #F8F8FF
.aliceBlue #F0F8FF
.lavender #E6E6FA
.azure #F0FFFF
.lightCyan #E0FFFF
.mintCream #F5FFFA
.honeyDew #F0FFF0
.ivory #FFFFF0
.beige #F5F5DC
.lightYellow #FFFFE0
.lightGoldenRodYellow #FAFAD2
.lemonChiffon #FFFACD
.floralWhite #FFFAF0
.oldLace #FDF5E6
.cornSilk #FFF8DC
.papayaWhip #FFEFD5
.blanchedAlmond #FFEBCD
.bisque #FFE4C4
.snow #FFFAFA
.linen #FAF0E6
.antiqueWhite #FAEBD7
.seaShell #FFF5EE
.lavenderBlush #FFF0F5
.mistyRose #FFE4E1
.gainsboro #DCDCDC
.lightGrayCSS3 #D3D3D3
.lightSteelBlue #B0C4DE
.lightBlue #ADD8E6
.lightSkyBlue #87CEFA
.powderBlue #B0E0E6
.paleTurquoise #AFEEEE
.skyBlue #87CEEB
.mediumAquamarine #66CDAA
.aquamarine #7FFFD4
.paleGreen #98FB98
.lightGreen #90EE90
.khaki #F0E68C
.paleGoldenRod #EEE8AA
.moccasin #FFE4B5
.navajoWhite #FFDEAD
.peachPuff #FFDAB9
.wheat #F5DEB3
.pink #FFC0CB
.lightPink #FFB6C1
.thistle #D8BFD8
.plum #DDA0DD
.silver #C0C0C0
.darkGrayCSS3 #A9A9A9
.lightSlateGray #778899
.slateGray #708090
.slateBlue #6A5ACD
.steelBlue #4682B4
.mediumSlateBlue #7B68EE
.royalBlue #4169E1
.dodgerBlue #1E90FF
.cornflowerBlue #6495ED
.deepSkyBlue #00BFFF
.aqua #00FFFF
.turquoise #40E0D0
.mediumTurquoise #48D1CC
.darkTurquoise #00CED1
.lightSeaGreen #20B2AA
.mediumSpringGreen #00FA9A
.springGreen #00FF7F
.lime #00FF00
.limeGreen #32CD32
.yellowGreen #9ACD32
.lawnGreen #7CFC00
.chartreuse #7FFF00
.greenYellow #ADFF2F
.gold #FFD700
.orangeCSS3 #FFA500
.darkOrange #FF8C00
.goldenRod #DAA520
.burlyWood #DEB887
.tan #D2B48C
.sandyBrown #F4A460
.darkSalmon #E9967A
.lightCoral #F08080
.salmon #FA8072
.lightSalmon #FFA07A
.coral #FF7F50
.tomato #FF6347
.orangeRed #FF4500
.deepPink #FF1493
.hotPink #FF69B4
.paleVioletRed #D87093
.violet #EE82EE
.orchid #DA70D6
.fuchsia #FF00FF
.mediumOrchid #BA55D3
.darkOrchid #9932CC
.darkViolet #9400D3
.blueViolet #8A2BE2
.mediumPurple #9370D8
.mediumBlue #0000CD
.darkCyan #008B8B
.cadetBlue #5F9EA0
.darkSeaGreen #8FBC8F
.mediumSeaGreen #3CB371
.teal #008080
.forestGreen #228B22
.seaGreen #2E8B57
.darkKhaki #BDB76B
.peru #CD853F
.crimson #DC143C
.indianRed #CD5C5C
.rosyBrown #BC8F8F
.mediumVioletRed #C71585
.dimGray #696969
.midnightBlue #191970
.darkSlateBlue #483D8B
.darkBlue #00008B
.navy #000080
.darkSlateGray #2F4F4F
.greenCSS3 #008000
.darkGreen #006400
.darkOliveGreen #556B2F
.oliveDrab #6B8E23
.olive #808000
.darkGoldenRod #B8860B
.chocolate #D2691E
.sienna #A0522D
.saddleBrown #8B4513
.fireBrick #B22222
.brownCSS3 #A52A2A
.maroon #800000
.darkRed #8B0000
.darkMagenta #8B008B
.indigo #4B0082

Requirements

  • Swift 3.0.1
  • iOS 9.0 or later

Installation

Carthage

CSS3ColorsSwift is available through Carthage. To install it, simply add the following line to your Cartfile:

github "WorldDownTown/CSS3ColorsSwift"

CocoaPods

CSS3ColorsSwift is available through CocoaPods. To install it, simply add the following line to your Podfile:

swift_version = '3.0.1'

...

pod 'CSS3ColorsSwift'

Manually

  1. Download and drop /CSS3ColorsSwift folder in your project.
  2. Congratulations!

Xcode Snippets

You can install code snippets of Color Literal for Xcode 8.

codesnippet

Installation

# bash, zsh
$ git clone https://github.com/WorldDownTown/CSS3ColorsSwift.git && cp CSS3ColorsSwift/XcodeSnippets/*.codesnippet ~/Library/Developer/Xcode/UserData/CodeSnippets/

# fish
$ git clone https://github.com/WorldDownTown/CSS3ColorsSwift.git; and cp CSS3ColorsSwift/XcodeSnippets/*.codesnippet ~/Library/Developer/Xcode/UserData/CodeSnippets/

Uninstallation

$ rm ~/Library/Developer/Xcode/UserData/CodeSnippets/CSS3ColorsSwift*.codesnippet

Author

WorldDownTown, [email protected]

License

CSS3ColorsSwift is available under the MIT license. See the LICENSE file for more info.

You might also like...
Color framework for Swift & Objective-C (Gradient colors, hexcode support, colors from images & more).
Color framework for Swift & Objective-C (Gradient colors, hexcode support, colors from images & more).

Swift 3 To use the Swift 3 version, add this to your Podfile (until 2.2 or higher is released): pod 'ChameleonFramework/Swift', :git = 'https://githu

An attractive color generator for Swift. Ported from randomColor.js.
An attractive color generator for Swift. Ported from randomColor.js.

Random Color Swift Inspired by David Merfield's randomColor.js. It is a ported version to Swift. You can use the library to generate attractive random

Flat UI color palette helpers written in Swift.
Flat UI color palette helpers written in Swift.

FlatUIColors (swift) install Make sure you have the latest version of CocoaPods (gem install cocoapods) that has Swift support. At the time of this wr

Google Material Color Palette in Swift

Google Material Color in Swift Defined Google Material Color value ready to use in Swift refer to Google Material Design in Style/Color section ###How

A beautiful set of predefined colors and a set of color methods to make your iOS/OSX development life easier.
A beautiful set of predefined colors and a set of color methods to make your iOS/OSX development life easier.

Installation Drag the included Colours.h and Colours.m files into your project. They are located in the top-level directory. You can see a demo of how

Generate color based on the given string.
Generate color based on the given string.

PFColorHash Swift 4.0 SUPPORT! Generate color based on the given string. Thanks to color-hash. Usage Basic let colorHash = PFColorHash() // in HSL, H

A Lightweight But Powerful Color Kit (Swift)
A Lightweight But Powerful Color Kit (Swift)

BCColor A lightweight but powerful color kit (Swift) Features Pick Colors From Image Generate Monochrome Image Support Hex Color Style Lighten / Darke

Aesthetic color-scheme generation written in Swift
Aesthetic color-scheme generation written in Swift

Lorikeet Lightweight framework for generating visually aesthetic color-schemes in Swift Requirements UIKit Features What can Lorikeet do for you Calcu

Overrides macOS external display EDIDs to force RGB color

edidiotic edidiotic creates EDID overrides for external displays on macOS that set the display type to RGB color and removes all extension blocks. Thi

Releases(1.1.5)
Owner
WorldDownTown
🍺👨‍💻🍺
WorldDownTown
HEX color handling as an extension for UIColor

HEX color handling as an extension for UIColor. Written in Swift

Thi Doãn 692 Dec 22, 2022
A simple UIColor category to get color with hex code.

TFTColor A simple UIColor library to get UIColor object from RGB hex string/value, CMYK hex string/value or CMYK base component values. You can also r

Burhanuddin Sunelwala 18 Jun 21, 2022
All wikipedia colors implemented as easy to use UIColor extension 🌈

UIColor-WikiColors All wikipedia colors implemented as an easy to use UIColor extension. Have you ever tried using UIColor.lightBlue just to be welcom

Szymon Maślanka 58 Jul 30, 2022
System Color Picker - The macOS color picker as an app with more features

System Color Picker The macOS color picker as an app with more features Download Requires macOS 11 or later. Features Quickly copy, paste, and convert

Sindre Sorhus 758 Dec 24, 2022
ColorWheel Test - An attempt at creating a Color Wheel to be utilized for color picking in SwiftUI utlizing various tutuorials on youtube

This code focuses on creating a Color Wheel in which a user will be able to select a desired color to then be implemented in another project that will display that color in an LED connected to an arduino

Gerardo Cerpa 0 Jan 15, 2022
ChromaColorPicker - An intuitive HSB color picker built in Swift

An intuitive HSB color picker built in Swift. Supports multiple selection handles and is customizable to your needs.

Jonathan Cardasis 536 Dec 29, 2022
SheetyColors is an action sheet styled color picker for iOS

?? Based on UIAlertController: The SheetyColors API is based on UIKit's UIAlertController. Simply add buttons to it as you would for any other Action Sheet by defining UIAlertAction instances. Therefore, it nicely integrates with the look & feel of all other native system dialogs. However, you can also chose to use the color picker it self without an action sheet.

Christoph Wendt 102 Nov 10, 2022
Convenience methods for creating color using RGBA hex string.

UIColor+Hex, now Swift. Convenience method for creating autoreleased color using RGBA hex string.

R0CKSTAR 1.2k Dec 23, 2022
UIGradient - A simple and powerful library for using gradient layer, image, color

UIGradient is now available on CocoaPods. Simply add the following to your project Podfile, and you'll be good to go.

Đinh Quang Hiếu 247 Dec 1, 2022
A tool to calculate the color ratio of UIImage in iOS.

UIImageColorRatio A tool to calculate the color ratio of UIImage in iOS. How to use UIImageColorRatio Get the color ratio of UIImage. let image = ...

Yanni Wang 王氩 34 Jan 1, 2023