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.
 

1.0 KiB

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