Giter Club home page Giter Club logo

chromakit's Introduction

ChromaKit

ChromaKit adds convenience API for SwiftUI.Color, UIKit.UIColor and AppKit.NSColor that lets you easily create colours in the Lch, Lab, Oklch, and Oklab colour spaces.

The colour transformations are based on CSS Color Module Level 4 sample code, and so should closely match what you see in most browsers.

Usage

Use the static functions on the Color, UIColor, or NSColor:

import ChromaKit

let lch = Color.lch(80, 80, 80)
let lab = Color.lab(80, 13.89, 78.78)
let oklch = UIColor.oklch(0.833, 0.168, 80.115)
let oklab = NSColor.oklab(0.833, 0.029, 0.165)

Installation

SPM

To use ChromaKit in your SPM package, add it as a dependency to your Package.swift:

.package(url: "https://github.com/HarshilShah/ChromaKit")

And include ChromaKit as a dependency for your target:

.product(name: "ChromaKit", package: "ChromaKit")

Xcode Project

To use ChromaKit in your Xcode project, select File > Add Packages in Xcode, and enter the URL for this repository in the search field:

https://github.com/HarshilShah/ChromaKit

chromakit's People

Contributors

harshilshah avatar dezinezync avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.