The repository for a command line / build pipeline tool for generating colors from a human-readable text file that designers can also use.

Related tags

Image ColorGen
Overview

ColorPaletteGenerator

ColorPaletteGenerator is a tool that takes a human-readable input file describing a color palette, and generates the associated code / assets that an Xcode project can use.

This is the successor to the RMRColorTools project that was written in Objective-C and has some legacy aspects to it that just aren't necessary. It is intended to be used in exactly the same way, but be available via the Swift Package Manager.

In the input file, you can declare:

  • A hex color value and provide it a label
  • 2 hex color values for one label, if you need different colors for 'dark mode' on iOS
  • Aliases to previously declared colors, so you can define a color and give it an abstract name, but use an alias for a specific purpose (i.e. navigationBarTitle)

The Input File will ultimately generate:

  • An .xcassets Assets Catalog with the colors (so to be available to Interface Builder)
  • A namespaced struct that contains all the color definitions as Constants that will reference these Colors in the asset catalog.

Input File Format

// MyAppColors.palette
//
// Lines beginning with // are ignored by the parser, so you can add comments for your team members.
//
// Or you can make comments be generated into the output file by adding them after the color name (see below)


// Define an opaque color in RRGGBB Hex Format. e.g. #FFEE24.   (# character is required!)
#RRGGBB ColorName Add some comments that should be generated into the output file.

// Or in RRGGBBAA format if you need transparency
#RRGGBBAA ColorNameTranslucent

// Perhaps you want to support Dark Mode.  Just add a second hex value after the first one.  The first is always 'Any' and the second is for dark mode.
#FF0000 #AA0000 Red You can see that the second value is darker than the first


// Create an Alias to an already defined color.  You can see the pattern: $ExistingColorname AliasName.  ($ character required!)
$ColorName MainTitleText

// You should ideally define your colors at the top, and all aliases below them!

``
 
You might also like...
An Xcode plugin to improve dealing with colors in your project
An Xcode plugin to improve dealing with colors in your project

Crayons is an Xcode7 plugin with various features that improve working with colors in your projects ##Code palettes (iOS only) You can share palettes

SwiftGen is a tool to automatically generate Swift code for resources of your projects (like images, localised strings, etc), to make them type-safe to use.
SwiftGen is a tool to automatically generate Swift code for resources of your projects (like images, localised strings, etc), to make them type-safe to use.

SwiftGen is a tool to automatically generate Swift code for resources of your projects (like images, localised strings, etc), to make them type-safe to use.

You can use blur effect and it's animation easily to call only two methods.

SABlurImageView You can use blur effect and it's animation easily to call only two methods. ManiacDev.com referred. https://maniacdev.com/2015/04/open

Same repository with SwiftUI&Combine
Same repository with SwiftUI&Combine

RSS Feed Reader SwiftUI&Combine This repository is an example iOS Application with SwiftUI & Combine & MVVM design pattern. Same example of this repos

Swift Package Manager command plugin for Swift-DocC

Swift-DocC Plugin The Swift-DocC plugin is a Swift Package Manager command plugin that supports building documentation for SwiftPM libraries and execu

AZS - There are two frameworks in the pod file, you need to install them to work with the project
AZS - There are two frameworks in the pod file, you need to install them to work with the project

AZS There are two frameworks in the pod file, you need to install them to work w

Create an '.icns' file from any image

createicns Create an '.icns' file from any image. Usage This command line tool makes it incredibly simple to create an '.icns' icon file from an image

An Xcode 7 plugin to build and run an app across multiple iOS devices with one click.
An Xcode 7 plugin to build and run an app across multiple iOS devices with one click.

RunEverywhere Xcode Plugin Overview An Xcode 7 plugin to build and run an app across multiple iOS devices with one click. Gone are the days of manuall

Slide image viewer library similar to Twitter and LINE.
Slide image viewer library similar to Twitter and LINE.

Overview You can use it simply by passing the necessary information! Serrata is a UI library that allows you to intuitively view images. Features King

Owner
horseshoe7
horseshoe7
Read colors from Xcode assets file.

XcodePalette Read colors from Xcode assets file. How to Use Download the XcodePalette.Executable.zip of the latest release. Extract the XcodePalette U

iMoeNya 0 Nov 12, 2021
add text(multiple line support) to imageView, edit, rotate or resize them as you want, then render the text on image

StickerTextView is an subclass of UIImageView. You can add multiple text to it, edit, rotate, resize the text as you want with one finger, then render the text on Image.

Textcat 478 Dec 17, 2022
Simple command-line utility for performing OCR using Apple's Vision framework

ocrit Runs Vision's OCR on input images and outputs corresponding txt files for each image, or writes the recognized results to standard output. USAGE

Guilherme Rambo 61 Nov 23, 2022
A complete Mac App: drag an image file to the top section and the bottom section will show you the text of any QRCodes in the image.

QRDecode A complete Mac App: drag an image file to the top section and the bottom section will show you the text of any QRCodes in the image. QRDecode

David Phillip Oster 2 Oct 28, 2022
NavigationCoordinator acts as a coordinator for NavigationView in SwiftUI. You can use pushView, popView, popToView, popToRootView as you can in traditional UIKit

NavigationCoordinator NavigationCoordinator acts as a coordinator for NavigationView. You can use pushView, popView, popToView, popToRootView in Swift

Shahriar Nasim Nafi 3 Aug 3, 2022
A Swift client library for generating URLs with imgix

imgix-swift is a client library for generating image URLs with imgix. Written in Swift, but can be used with Objective-C codebases as well. Installati

imgix 24 Sep 28, 2022
Fetches the most dominant and prominent colors from an image.

UIImageColors iTunes style color fetcher for UIImage and NSImage. It fetches the most dominant and prominent colors. Installation Manual Copy UIImageC

null 3.2k Jan 1, 2023
Create complementary gradients generated from dominant and prominent colors in supplied image. Inspired by Grade.js

ComplimentaryGradientView Create complementary gradients generated from dominant and prominent colors in supplied image. Inspired by Grade.js ❤️ .all

George Kye 728 Dec 17, 2022
ColorKit makes it easy to find the dominant colors of an image

ColorKit ColorKit is your companion to work with colors on iOS. Features Installation Sample Project Contributing License Features Dominant Colors Col

Boris Emorine 570 Jan 5, 2023
Terminal Colors for Swift

Terminal string styling for Swift Colors is a clean and focused solution for string styling in Swift. Usage import Colors print(Colors.blue("Blue str

Paulo Tanaka 94 Sep 9, 2022