Name4RGB

0.1.1

Open Source Library to Find the Nearest Color Name in Swift
ProjectInTheClass/Name4RGB

What's New

Name4RGB v0.1.1

2023-12-24T07:56:31Z

Support iOS 16

Name4RGB

Open Source Library to Find the Nearest Color Name for Color and UIColor.

Installation

Swift Package Manager

For installation with Swift Package Manager, add the following to Package.swift:

.package(url: "https://github.com/ProjectInTheClass/Name4RGB", from: "0.1.0")

How To Use

Find name of Color

You can easily find find name of Color, localized color names by specifying the language and region.

let color = Color(red: 0.4, green: 0.4, blue: 0.4)
print(color.name())        // dimgray
print(color.name("en-GB")) // dimgrey

let uiColor = UIColor(red: 0.4, green: 0.4, blue: 0.4, alpha: 1.0)
print(uiColor.name())        // dimgray
print(uiColor.name("en-GB")) // dimgrey

License

Distributed under the MIT License. See LICENSE for more information.

Description

  • Swift Tools 5.7.0
View More Packages from this Author

Dependencies

  • None
Last updated: Sat Apr 13 2024 00:43:25 GMT-0900 (Hawaii-Aleutian Daylight Time)