Skip to content

tylersamples/random_color

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RandomColor

Elixir port of davidmerfield/randomColor

Installation

The package can be installed by adding random_color to your list of dependencies in mix.exs:

def deps do
  [
    {:random_color, "~> 0.1.0"}
  ]
end

Basic Usage

RandomColor.hex() # #13B592

RandomColor.rgb() # {189, 81, 542}
RandomColor.rgb(format: :string) # rgb(189, 81, 542)

RandomColor.hex(hue: :red) # #9B112C
RandomColor.hex(hue: :red, luminosity: :light) # #FFB2CA

RandomColor.hsla([], 0.5) # hsla(117, 65.29%, 48.4%, 0.5)

The docs can be found at https://hexdocs.pm/random_color.

License

MIT

About

Utility for generating random colors in Elixir

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages