All Projects → jakemarsh → Costumekit

jakemarsh / Costumekit

Licence: other
Base types for theming an app.

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Costumekit

Maker.js
📐⚙ 2D vector line drawing and shape modeling for CNC and laser cutters.
Stars: ✭ 1,185 (+295%)
Mutual labels:  svg, fonts
Darklaf
Darklaf - A themeable swing Look and Feel based on Darcula-Laf
Stars: ✭ 249 (-17%)
Mutual labels:  svg, themes
Opentype Svg Font Editor
A user-friendly tool for adding SVG to OpenType fonts
Stars: ✭ 126 (-58%)
Mutual labels:  svg, fonts
React Svg
🎨 A React component that injects SVG into the DOM.
Stars: ✭ 536 (+78.67%)
Mutual labels:  svg, images
Swash
Fonts in iOS made safe, expressive, and dynamic.
Stars: ✭ 73 (-75.67%)
Mutual labels:  fonts, carthage
Linearicons
Linearicons is the highest quality set of line icons, matching with minimalist UI designs in iOS.
Stars: ✭ 64 (-78.67%)
Mutual labels:  svg, fonts
Vectorlogozone
3,000+ gorgeous SVG logos, perfect for your README or credits page
Stars: ✭ 239 (-20.33%)
Mutual labels:  svg, images
Randomkit
Random data generation in Swift
Stars: ✭ 1,458 (+386%)
Mutual labels:  protocol, carthage
SwiftGradients
Useful extensions for UIViews and CALayer classes to add beautiful color gradients.
Stars: ✭ 15 (-95%)
Mutual labels:  carthage, colors
ImmersiveColors
Easy way to access Windows 10 Immersive colors
Stars: ✭ 64 (-78.67%)
Mutual labels:  colors, themes
Imgix Swift
A Swift client library for generating URLs with imgix
Stars: ✭ 19 (-93.67%)
Mutual labels:  images, carthage
M5ez
Complete interface builder for the M5Stack, an ESP32 based mini tinker-computer
Stars: ✭ 260 (-13.33%)
Mutual labels:  themes, fonts
Image Palette
Generate a WCAG compliant color theme from any image
Stars: ✭ 331 (+10.33%)
Mutual labels:  images, colors
Sqip
"SQIP" (pronounced \skwɪb\ like the non-magical folk of magical descent) is a SVG-based LQIP technique.
Stars: ✭ 3,074 (+924.67%)
Mutual labels:  svg, images
Serrata
Slide image viewer library similar to Twitter and LINE.
Stars: ✭ 322 (+7.33%)
Mutual labels:  images, carthage
Svg Credit Card Payment Icons
SVG Credit Card & Payment Icons: 6 Styles, 80 Icons
Stars: ✭ 227 (-24.33%)
Mutual labels:  svg, images
Core Layout
Flexbox & CSS-style Layout in Swift.
Stars: ✭ 215 (-28.33%)
Mutual labels:  ios-lib, carthage
Foldingtabbar.ios
Folding Tab Bar and Tab Bar Controller
Stars: ✭ 3,677 (+1125.67%)
Mutual labels:  protocol, carthage
Theme-Engine
Theme-Engine is usually made for modification & customization, so you can make trunks even more Colourful and better your Termux.
Stars: ✭ 31 (-89.67%)
Mutual labels:  fonts, themes
Mega Doodles Pack
🔥 Big vector pack with hand-drawn doodles for presentations, social media, blog posts and so on
Stars: ✭ 258 (-14%)
Mutual labels:  svg, images

CostumeKit 🎩

Base types for theming an app.

CostumeKit is made of up a set of Swift protocols. They are meant to be implemented by you in your app.

Featured in Little Bites of Cocoa Bite #270: Implementing Theming with CostumeKit

Color 🎨

Includes Color and ColorPalette protocols.

Usage:

public enum MyAppColors : Color, ColorPalette {
  case white = "FFFFFF"
  case lightTeal = "3CB39E"
  case forestGreen = "216055"
  case black = "000000"
}

Font 🔠

Includes Font protocol, and one concrete SystemFont implementation for iOS system fonts.

Usage:

public struct MyAppFont : Font {
  public init(size: FontSize = .textStyle(.body)) {
    self.size = size
  }

  // Font

  public var size: FontSize

  // FontConvertible

  public var FontValue: UIFont {
    return UIFont(name: "SomeCustomFont", size: pointSize)!
  }
}

SVG 🌠

Includes SVG Protocol and SVGMetadata type.

Usage:

enum MyAppSVGs {
  case clockGlyph
  case bird
}

extension MyAppSVGs : SVG {
  public func metadata() -> SVGMetadata {
    switch self {
      case .clockGlyph: return SVGMetadata(name: "clock", size: CGSize(width: 100, height: 100), fullColor: false)
      case .bird: return SVGMetadata(name: "bird", size: CGSize(width: 58, height: 28), fullColor: true)
    }
  }
}

What you do with SVGMetadata is up to you. I recommend SwiftSVG from Michael Choe. Read more here to learn how to use it.

CostumeKit's goals are to be a generic solution, so no assumptions are made about how something should be retrieved from disk, parsed, etc. You'll need to implement these anyways, so nothing is forced on you.

Costume 🎩

Includes Costume protocol. Usage:

open class MyAppCostume : Costume {
  let spacing = CGFloat(8)

  public func wearRootBackground(_ view: UIView) {
    view.backgroundColor = Color.black.colorValue
  }

  public func wearHeadline(_ label: UILabel) {
    label.font = MyAppFont(size: .textStyle(.title1)).fontValue
    label.textColor = MyAppColors.forestGreen.colorValue
  }

  public var name: String { return "Default" }
  public var description: String { return "The default costume." }

  public init() { }
}

Cheers.

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].