https://github.com/code-lever/color-stream-elixir
Generated colors using Elixir streams.
https://github.com/code-lever/color-stream-elixir
Last synced: 12 months ago
JSON representation
Generated colors using Elixir streams.
- Host: GitHub
- URL: https://github.com/code-lever/color-stream-elixir
- Owner: code-lever
- License: mit
- Created: 2015-12-28T21:23:57.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2022-07-24T06:16:49.000Z (over 3 years ago)
- Last Synced: 2025-03-25T19:46:24.649Z (about 1 year ago)
- Language: Elixir
- Homepage:
- Size: 14.6 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Color Stream
[](https://travis-ci.org/code-lever/color-stream-elixir)
[](https://hex.pm/packages/color_stream)
Generate random colors in a pleasing way, based on work from the [ColorGenerator](https://github.com/jpmckinney/color-generator) Ruby gem, and the [How to Generate Random Colors Programmatically](http://martin.ankerl.com/2009/12/09/how-to-create-random-colors-programmatically/) post by Martin Ankerl.
## Installation
Add color_stream to your list of dependencies in `mix.exs`:
def deps do
[{:color_stream, "~> 0.0.1"}]
end
## Basic Usage
iex> ColorStream.hex |> Enum.take(5)
["7F6C3F", "5A3F7F", "3F7F47", "7F3F4A", "3F5D7F"]
iex> ColorStream.hex(hue: 0.5) |> Enum.take(2)
["F1BE42", "8B42F1"]
Be sure to read [the documentation too](http://hexdocs.pm/color_stream).