Skip to content

A python library for converting colour temperature (Kelvin) to RGB values

License

Notifications You must be signed in to change notification settings

esemeniuc/kelvin_rgb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kelvin_rgb

A python library for converting colour temperature (Kelvin) to RGB values

alt text

Convert color from RGB to Kelvin and back

Installation

pip install kelvin_rgb

Usage

import kelvin_rgb
r, g, b = kelvin_rgb.k_to_rgb(3500)
print(r,g,b) #outputs (255, 138, 195)
hex = kelvin_rgb.k_to_rgb_hex(3500)                                                                                          
print(hex) #outputs '#ff8ac3'

Note: The conversions use approximations and are suitable for photo-manipulation and other non-critical uses.

Accuracy is best between 1000K and 40000K.

About

A python library for converting colour temperature (Kelvin) to RGB values

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages