Skip to content

🌈 Colorsys.jl is a Julia package(or lib) for everyone to transform one color system to another. The transformation is among RGB, YIQ, HLS and HSV.

License

Notifications You must be signed in to change notification settings

cckuailong/Colorsys.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Colorsys.jl

Build Status Coveralls

What is Colorsys.jl

Colorsys.jl is a Julia package(or lib) for everyone to transform one color system to another. The transformation is among RGB, YIQ, HLS and HSV.

Install

import Pkg
Pkg.clone("https://github.com/cckuailong/Colorsys.jl.git")

Import

using Colorsys

How to use it

Parameter Range

All inputs and outputs are three floats in the range [0.0...1.0] (with the exception of I and Q, which covers a slightly larger range also with the exception of R, G and B, which range from 0 to 255 also with the exception of H, which range from 0 to 360).

range of each parameter
R, G, B :    0 ~ 255
I, Q :      -1 ~ 1.X
H :          0 ~ 360
Y, S, V, L : 0 ~ 1

Examples

  1. RGB to YIQ
y, i, q = rgb2yiq(r, g, b)
  1. YIQ to RGB
r, g, b = yiq2rgb(y, i, q)
  1. RGB to HLS
h, l, s = rgb2hls(r, g, b)
  1. HLS to RGB
r, g, b = hls2rgb(h, l, s)
  1. RGB to HSV
h, s, v = rgb2hsv(r, g, b)
  1. HSV to RGB
r, g, b = hsv2rgb(h, s, v)
  1. Yiq to Hls
h, l, s = yiq2hls(y, i, q)
  1. YIQ to HSV
h, s, v = yiq2hsv(y, i, q)
  1. HLS to YIQ
y, i, q = hls2yiq(h, l, s)
  1. HLS to HSV
h, s, v = hls2hsv(h, l, s)
  1. HSV to YIQ
y, i, q = hsv2yiq(h, s, v)
  1. HSV to HLS
h, l, s = hsv2hls(h, s, v)

Contact

Any questions, welcome to email me at 346813862Hjj@gmail.com

My Blog is lovebear.top

About

🌈 Colorsys.jl is a Julia package(or lib) for everyone to transform one color system to another. The transformation is among RGB, YIQ, HLS and HSV.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages