All Projects → mRs- → Hexcolors

mRs- / Hexcolors

Licence: mit
HexColors is an extension for UIColor and NSColor to support for creating colors from a hex strings

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Hexcolors

Xcodecolorsense2
🍉 An Xcode source editor extension that shows hex color info
Stars: ✭ 281 (-38.11%)
Mutual labels:  extension, hex
Upmgitextension
This package extends the UI of Unity Package Manager (UPM) for the packages installed from git repository.
Stars: ✭ 438 (-3.52%)
Mutual labels:  extension
Colorkit
Advanced color manipulation for iOS.
Stars: ✭ 388 (-14.54%)
Mutual labels:  hex
Cloak
Elixir encryption library designed for Ecto
Stars: ✭ 413 (-9.03%)
Mutual labels:  hex
Amvim For Vscode
The Vim mode for Visual Studio Code(vscode) that works as expected.
Stars: ✭ 393 (-13.44%)
Mutual labels:  extension
Uiview Positioning
Easy property-based setting of frame properties in UIView objects
Stars: ✭ 414 (-8.81%)
Mutual labels:  extension
Honeycomb
Create hex grids easily, in node or the browser.
Stars: ✭ 380 (-16.3%)
Mutual labels:  hex
Sieve
Sieve Script Editor
Stars: ✭ 452 (-0.44%)
Mutual labels:  extension
Scriptsafe
a browser extension to bring security and privacy to chrome, firefox, and opera
Stars: ✭ 434 (-4.41%)
Mutual labels:  extension
Fontisto
The iconic font and CSS toolkit. Fontisto gives you scalable vector icons that can instantly be customized: size, color, drop shadow and anything that can be done with the power of CSS.
Stars: ✭ 413 (-9.03%)
Mutual labels:  extension
Github Dark Theme
GitHub Dark Theme - Extension for Chrome, Firefox, and Microsoft Edge
Stars: ✭ 413 (-9.03%)
Mutual labels:  extension
Tamperchrome
Tamper Dev is an extension that allows you to intercept and edit HTTP/HTTPS requests and responses as they happen without the need of a proxy. Works across all operating systems (including Chrome OS).
Stars: ✭ 3,968 (+774.01%)
Mutual labels:  extension
Zhparser
zhparser is a PostgreSQL extension for full-text search of Chinese language
Stars: ✭ 418 (-7.93%)
Mutual labels:  extension
Roam Toolkit
Roam force multiplier
Stars: ✭ 390 (-14.1%)
Mutual labels:  extension
Vscode Es7 Javascript React Snippets
Extension for Javascript/React snippets with search supporting ES7 and babel features
Stars: ✭ 435 (-4.19%)
Mutual labels:  extension
Textext
Re-editable LaTeX graphics for Inkscape
Stars: ✭ 383 (-15.64%)
Mutual labels:  extension
1click Webpage Screenshot
Entire page Screenshot extension for Google Chrome. I'm developing open source extension for Google Chrome. All extension are free for use. Let's make Chrome great again!
Stars: ✭ 406 (-10.57%)
Mutual labels:  extension
Bs Detector
🚨 THIS REPOSITORY HAS MOVED. 🚨
Stars: ✭ 414 (-8.81%)
Mutual labels:  extension
Mimetype
A fast golang library for MIME type and file extension detection, based on magic numbers
Stars: ✭ 452 (-0.44%)
Mutual labels:  extension
Gem Release
Release your ruby gems with ease.
Stars: ✭ 448 (-1.32%)
Mutual labels:  extension

HexColors

Platform Xcode Swift Downloads Month Cocoapods Build Status codecov

HexColors is an extension for UIColor and NSColor to support for creating colors from a hex string like #FF0088 or 8844FF and back to a String. Completely rewritten in Swift 3!

If you want to use this in Objective-C jump to the 4.X version tag. If you want to use this in Swift < 3.2 use the 5.X version tag.

RELEASE 6.0.0

Swift 4.0 compatiblity

Examples

How to use HexColors in the different systems.

iOS / watchOS / tvOS

Generating UIColors

let colorWithHex = UIColor("#ff8942")
let colorWithoutHex = UIColor("ff8942")
let colorWithHexAndAlhpa = UIColor("#ff8942DF")
let colorWithoutHexAndAlhpa = UIColor("ff8942DF")
let shortColorWithHex = UIColor("#fff")
let shortColorWithoutHex = UIColor("fff")
let shortColorWithHexAndAlpha = UIColor("#FFFD")
let shortColorWithoutHexAndAlpha = UIColor("#FFFD")

Generating Hex Strings from UIColor

let colorWithHex = UIColor("#ff8942")
let stringFromColor = colorWithHex.hex

macOS

Generating NSColor

let colorWithHex = NSColor("#ff8942")
let colorWithoutHex = NSColor("ff8942")
let colorWithHexAndAlhpa = NSColor("#ff8942DF")
let colorWithoutHexAndAlhpa = NSColor("ff8942DF")
let shortColorWithHex = NSColor("#fff")
let shortColorWithoutHex = NSColor("fff")
let shortColorWithHexAndAlpha = NSColor("#FFFD")
let shortColorWithoutHexAndAlpha = NSColor("#FFFD")

Generating Hex Strings from NSColor

let colorWithHex = NSColor("#ff8942")
let stringFromColor = colorWithHex.hex

Installation

Requirements

HexColors requires >= iOS 8.0 and >=macOS 10.9.

Cocoapods

Add HexColors to your Podfile:

pod 'HexColors'
  • pod install HexColors

Carthage

Add HexColors to your Cartfile:

github "mRs-/HexColors"

Swift Package Manager

To work with the Swift Package Manager you need to add a Package.swift file and defining your package.

import PackageDescription

let package = Package(
    name: "YourPackageName",
    dependencies: [
        .Package(url: "https://github.com/mRs-/HexColors", majorVersion: 5),
    ]
)

Then execute the Swift Package Manager with the following Shell commands:

swift build
.build/debug/YourPackageName

Manual

Simply just drag and drop the HexColors.swift in your project.

Credits

HexColors was created by Marius Landwehr because of the pain to create Colors from a API (mostly hex) converting to a UI/NSColor.

Creator

Marius Landwehr @mariusLAN

License

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].