Golden ratio based color generation.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
Danila Fedorin 3d9cf7858b Create initial version of shard. 3 years ago
spec Create initial version of shard. 3 years ago
src Create initial version of shard. 3 years ago
.editorconfig Create initial version of shard. 3 years ago
.gitignore Create initial version of shard. 3 years ago
.travis.yml Create initial version of shard. 3 years ago
LICENSE Create initial version of shard. 3 years ago
README.md Create initial version of shard. 3 years ago
shard.yml Create initial version of shard. 3 years ago

README.md

golden-color

A simple shard to generate colors using the golden ratio method.

Installation

Add this to your application's shard.yml:

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".

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 Danila Fedorin - creator, maintainer