Skip to content
/ ex-hsluv Public

Elixir HSLuv colorspace functions

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

kuon/ex-hsluv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HSLuv

Elixir library to convert RGB to HSLuv and vice versa.

HSLuv is a color space for easy color manipulation in perceptual space.

https://www.hsluv.org/

Installation

If available in Hex, the package can be installed by adding hsluv to your list of dependencies in mix.exs:

def deps do
  [
    {:hsluv, "~> 0.2.0"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/hsluv.

Example

# Create an HSLuv color from RGB values (0-255)
iex> HSLuv.rgb(200, 150, 20)
%HSLuv{h: 57.26077539223336, l: 65.07659371178795, s: 97.61326139925325}

# Convert HSL values to RGB (0-255)
iex> HSLuv.to_rgb(20, 50, 20)
{75, 38, 31}

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

Elixir HSLuv colorspace functions

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published