41 lines
1.0 KiB
Markdown
41 lines
1.0 KiB
Markdown
|
# golden-color
|
||
|
|
||
|
A simple shard to generate colors using the golden ratio method.
|
||
|
|
||
|
## Installation
|
||
|
|
||
|
Add this to your application's `shard.yml`:
|
||
|
|
||
|
```yaml
|
||
|
dependencies:
|
||
|
golden-color:
|
||
|
git: https://dev.danilafe.com/DanilaFe/golden-color
|
||
|
```
|
||
|
|
||
|
## Usage
|
||
|
|
||
|
The first step to using golden-color is to create a color generator.
|
||
|
The saturation and value parameters can be used to ajust the colors
|
||
|
that are produced. Additionally, the seed parameter can be modified
|
||
|
to change the starting hue. Colors can then be generated by repeated
|
||
|
calls to "generate".
|
||
|
|
||
|
```crystal
|
||
|
require "golden-color"
|
||
|
|
||
|
generator = GoldenColor::ColorGen.new saturation: 0.5, value: 0.95
|
||
|
color = generator.generate
|
||
|
```
|
||
|
|
||
|
## Contributing
|
||
|
|
||
|
1. Fork it
|
||
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
||
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
||
|
4. Push to the branch (`git push origin my-new-feature`)
|
||
|
5. Create a new Pull Request
|
||
|
|
||
|
## Contributors
|
||
|
|
||
|
- [DanilaFe](https://dev.danilafe.com/DanilaFe) Danila Fedorin - creator, maintainer
|