ascflatuicolor

Welcome to the documentation for ascFlatUIColor!

Overview

ascFlatUIColor is a powerful library that provides a wide range of flat UI colors for your iOS applications. This library includes a collection of pre-defined colors that you can easily use in your projects.

Installation

  1. Open your Xcode project.
  2. Go to File > Swift Packages > Add Package Dependency.
  3. In the search bar, enter https://github.com/ascgear/ascFlatUIColor.git and click Next.
  4. Select the latest version of the package and click Next.
  5. Choose the targets where you want to add the package and click Finish.

Usage

Importing the Library

In your Swift file, import the library using the following code:

// Swift
import ascFlatUIColor

Accessing Flat UI Colors

To use the flat UI colors, simply access the predefined static properties provided by the ascFlatUIColor library. Here is an example:

// Swift
let myColor = ascFlatUIColor.concrete

Available Colors

ascFlatUIColor provides a wide range of flat UI colors to choose from. Here are some of the available colors:

  • Concrete: A dark gray color (#95a5a6).
  • Clouds: A light gray color (#ecf0f1).
  • Emerald: A vibrant green color (#2ecc71).
  • Peter River: A vibrant blue color (#3498db).
  • Sunflower: A bright yellow color (#f1c40f).

Custom Colors

If you have specific colors in mind that are not included in the predefined list, you can easily define your own custom colors using the UIColor initializer. Here is an example:

// Swift
let customColor = UIColor(red: 0.5, green: 0.7, blue: 0.9, alpha: 1.0)

Examples

Here are some examples of using ascFlatUIColor in your iOS applications:

  1. Example 1: Changing the background color of a view to the Concrete color:
// Swift
let myView = UIView()
myView.backgroundColor = ascFlatUIColor.concrete
  1. Example 2: Setting the text color of a label to the Clouds color:
// Swift
let myLabel = UILabel()
myLabel.textColor = ascFlatUIColor.clouds

Conclusion

ascFlatUIColor is a fantastic library that allows you to easily incorporate beautiful flat UI colors into your iOS applications. With its wide range of pre-defined colors, as well as the ability to define custom colors, you have unlimited possibilities to create stunning user interfaces.