iColor

Quickly add modern Colors to your SwiftUI app. 🎨

1.

Install iColor.

2.

Add iColor to your project.

import SwiftUI
import iColor

struct ContentView: View {
    var body: some View {
        Rectangle()
           .fill(Color.neonBlue)
    }
}

3.

Play with your iColors.



Examples

Ocean

Use these colors to convey healthy, community, & trust.

import SwiftUI
import iColor

struct ContentView: View {
    var body: some View {
        VStack {
            HStack {
                Rectangle().fill(Color.lightGreen).cornerRadius(5)
                Rectangle().fill(Color.neonGreen).cornerRadius(5)
                Rectangle().fill(Color.darkGreen).cornerRadius(5)
            }
            HStack {
                Rectangle().fill(Color.lightOceanBlue).cornerRadius(5)
                Rectangle().fill(Color.neonOceanBlue).cornerRadius(5)
                Rectangle().fill(Color.darkOceanBlue).cornerRadius(5)
            }
            HStack {
                Rectangle().fill(Color.lightBlue).cornerRadius(5)
                Rectangle().fill(Color.neonBlue).cornerRadius(5)
                Rectangle().fill(Color.darkBlue).cornerRadius(5)
            }
        }
    }
}

Volcano

Use these colors to convey energy, urgency, or action.

import SwiftUI
import iColor

struct ContentView: View {
    var body: some View {
        VStack {
            HStack {
                Rectangle().fill(Color.lightPink).cornerRadius(5)
                Rectangle().fill(Color.neonPink).cornerRadius(5)
                Rectangle().fill(Color.darkPink).cornerRadius(5)
            }
            HStack {
                Rectangle().fill(Color.lightRed).cornerRadius(5)
                Rectangle().fill(Color.neonRed).cornerRadius(5)
                Rectangle().fill(Color.darkRed).cornerRadius(5)
            }
            HStack {
                Rectangle().fill(Color.lightOrange).cornerRadius(5)
                Rectangle().fill(Color.neonOrange).cornerRadius(5)
                Rectangle().fill(Color.darkOrange).cornerRadius(5)
            }
        }
    }
}

Grays

Use these colors to standardize your user experience.

import SwiftUI
import iColor

struct ContentView: View {
    var body: some View {
        VStack {
            HStack {
                Rectangle().fill(Color.lightGray).cornerRadius(5)
                Rectangle().fill(Color.mediumgray).cornerRadius(5)
            }
            HStack {
                Rectangle().fill(Color.darkGray).cornerRadius(5)
                Rectangle().fill(Color.black).cornerRadius(5)
            }
        }
    }
}

Customize

The iColor package provides an extension of the SwiftUI Color class. All properties are static & make it easy to match accessibility standards in your app UI.


Use our exhaustive input list to customize your colors.

Property Visual
Color.lightRed 
Color.lightOrange 
Color.lighGreen 
Color.lightOceanBlue 
Color.lightBlue 
Color.lightPurple 
Color.lightPink 
Color.neonRed 
Color.neonOrange 
Color.neonGreen 
Color.neonOceanBlue 
Color.neonBlue 
Color.neonPurple 
Color.neonPink 
Color.darkRed 
Color.darkOrange 
Color.darkGreen 
Color.darkOceanBlue 
Color.darkBlue 
Color.darkPurple 
Color.darkPink 
Color.lightGray 
Color.mediumGray 
Color.darkGray 

iColor also extends Color to add several custom initializers to the class, including initialize by hex #, and initialize by integers from 0-255.

Initializer Description
Color.init?(_ hex: String, opacity: Double = 1.0) -> Color
Creates a new Color 🎨 object from a hex value (e.g. "#18B5DF"), represented as a String. Opacity is inputted as a Double from 0.0 to 1.0.
Color.init?(_ hex: String, opacity: Int = 100) -> Color
Creates a new Color 🎨 object from a hex value (e.g. "#18B5DF"), represented as a String. Opacity is inputted as an Integer from 0 to 100.
Color.init(_ colorSpace: Color.RGBColorSpace = .sRGB, red: Int, green: Int, blue: Int, opacity: Int = 100)
Creates a new Color object from Integer RGB values ranging from 0 to 255.

Community

Meet the developers behind iColor.

@AlexFine


iOS 13.0+

WatchOS 6.0+