Skip to content

HapticTide/ColorVector

 
 

Repository files navigation

ColorVector

Used for color with conversion between different color spaces.

Platform

Works on Foundation available devices. Should work on all Swift supported platforms.

Usage

Add this package into your project.

dependencies: [
    .package(url: "https://github.com/Lakr233/ColorVector.git", from: "1.0.0"),
]

Then you can use it like this:

import ColorVector

let colorVectorRGB = ColorVector(v: .init(
    Double.random(in: 0 ... 255),
    Double.random(in: 0 ... 255),
    Double.random(in: 0 ... 255),
    Double.random(in: 0 ... 1)
), space: .rgb)
let someLCHColor = colorVectorRGB.lch
let someLABColor = colorVectorRGB.lab
let someXYZColor = colorVectorRGB.xyz

License

This project is licensed under the MIT License - see the LICENSE file for details.


Copyright © 2023 Lakr Aream. All Rights Reserved.

About

Color with its space, in Swift.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Swift 100.0%