Black body temperature to color in swift.
Add the following in your project's Cartfile:
github "DJBen/KelvinColor" ~> 0.1.0
Temperature to color and color to temperature methods are extensions of UIColor
class. No other classes are required!
- Kelvin to
UIColor
UIColor.init(temperature: 6500)
// (255, 249, 253)
- UIColor to Kelvin
color.temperature