RandomColorSwift alternatives and similar libraries
Based on the "Colors" category.
Alternatively, view RandomColorSwift alternatives based on common mentions on social networks and blogs.
Chameleon9.9 0.0 RandomColorSwift VS ChameleonColor framework for Swift & Objective-C (Gradient colors, hexcode support, colors from images & more).
SwiftGen-Colors9.8 9.1 L5 RandomColorSwift VS SwiftGen-ColorsThe Swift code generator for your assets, storyboards, Localizable.strings, … — Get rid of all String-based APIs!
Hue9.1 0.0 L2 RandomColorSwift VS Hue:art: Hue is the all-in-one coloring utility that you'll ever need.
DynamicColor8.7 0.0 L5 RandomColorSwift VS DynamicColorYet another extension to manipulate colors easily in Swift and SwiftUI
UIColor-Hex-Swift7.5 4.6 L5 RandomColorSwift VS UIColor-Hex-SwiftConvenience methods for creating color using RGBA hex string.
SwiftHEXColors6.5 2.6 L5 RandomColorSwift VS SwiftHEXColorsHEX color handling as an extension for UIColor.
Gradients6.4 0.0 RandomColorSwift VS Gradients🌔 A curated collection of splendid 180+ gradients made in swift
ChromaColorPicker:art: An intuitive iOS color picker built in Swift.
ColorKit5.8 0.0 RandomColorSwift VS ColorKitAdvanced color manipulation for iOS.
UIGradient4.1 2.2 RandomColorSwift VS UIGradientA simple and powerful library for using gradient layer, image, color
FlatUIColors3.5 0.0 L4 RandomColorSwift VS FlatUIColorsFlat UI color palette helpers written in Swift.
PrettyColors3.4 0.0 L5 RandomColorSwift VS PrettyColorsStyles and colors text in the Terminal with ANSI escape codes. Conforms to ECMA Standard 48.
SheetyColors2.6 0.0 RandomColorSwift VS SheetyColorsAn action sheet styled color picker for iOS.
HexColor2.5 0.0 L5 RandomColorSwift VS HexColorUtility that lets you define UIColors in Swift as they've meant to be defined: as HEX values
AEConicalGradient2.3 0.0 L5 RandomColorSwift VS AEConicalGradientConical (angular) gradient for iOS written in Swift
Colorify2.3 0.0 RandomColorSwift VS ColorifyColorify
ImagePalette2.1 0.0 L5 RandomColorSwift VS ImagePaletteSwift/iOS port of Android's Palette https://developer.android.com/reference/android/support/v7/graphics/Palette.html
CSS3ColorsSwift1.5 0.0 L5 RandomColorSwift VS CSS3ColorsSwiftA UIColor extension with CSS3 Color names.
Google Material Color1.4 0.0 L4 RandomColorSwift VS Google Material ColorGoogle Material Color Palette in Swift
UIColor-WikiColorsAll wikipedia colors implemented as easy to use UIColor extension 🌈
Colors0.9 0.0 L5 RandomColorSwift VS ColorsA pure Swift library for using ANSI codes. Basically makes command-line coloring and styling very easy!
UIColorWDUtils0.2 0.0 L5 RandomColorSwift VS UIColorWDUtilsAn iOS Swift UIColor extension
Appwrite - The Open Source Firebase alternative introduces iOS support
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of RandomColorSwift or a related project?
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 colors on iOS or macOS.
This framework supports Swift 4.0/4.2/5.0 and above.
Swift Package Manager
Just like using any other Swift Package, add this repo to the
dependencies section and depend it in your target:
let package = Package( name: "MyApp", //... dependencies: [ .package(url: "https://github.com/onevcat/RandomColorSwift.git", .upToNextMajor(from: "2.0.0")), ], targets: [ .target( name: "MyApp", dependencies: ["RandomColor"]), ]
Or, use the Swift Package Manager integrated in Xcode 11 or above to add this package as a dependency to your app.
The easiest way to use
RandomColor is installing it by CocoaPods. Add these lines to your Podfile:
source 'https://github.com/CocoaPods/Specs.git' platform :ios, '8.0' # platform :osx, '10.10' use_frameworks! pod 'RandomColorSwift'
Carthage is also supported:
If you need to support iOS 7.x, you will need to add the library manually into your project since dynamic framework is not supported for iOS 7.
Clone this repo and throw the source files under
RandomColor folder into your project to use it.
import RandomColor // Returns a UIColor or NSColor object for an attractive color let color = randomColor() // Returns an array of ten green colors let greenColors = randomColors(count: 10, hue: .green) // Returns a color for light blue let lightBlurColor = randomColor(hue: .blue, luminosity: .light) // Returns a color for a 'truly random' color let randomColor = randomColor(hue: .random, luminosity: .random) // Returns an array of ten dark pink colors let darkPinkColors = randomColors(count: 10, hue: .pink, luminosity: .dark) // Returns an array of twenty colors at hue of 120 let colors = randomColors(count: 20, hue: .value(120), luminosity: .random)
There is also a demo project in this repo.
You can pass an options object to influence the type of color it produces. The options object accepts the following properties:
Hue – Controls the hue of the generated color. Possible hue values for colors are
.value(Int). If you use
.value(Int), you should pass an
Int between 0 and 360.
Luminosity – Controls the luminosity of the generated color. You can pass
Count – An
Int which specifies the number of colors to generate.
Thanks for David Merfield bringing us randomColor.js, which is a great utility.
This project is licensed under the terms of the MIT license.
*Note that all licence references and agreements mentioned in the RandomColorSwift README section above are relevant to that project's source code only.