Skip to content

Commit

Permalink
v0.3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
ksz2k committed Feb 5, 2019
1 parent bb7cbf9 commit a25955f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
0.3.7
-----

- added `LetterAvatar.custom_palette` config option.
- bumped `FULLSIZE` to 600.

0.3.6
-----

Expand Down
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,23 @@ end

#### Color palette

We have two color palettes implemented: `iwanthue` and `google`.
We have three color palettes implemented: `iwanthue`, `google` and `custom`.

Each of them have different colors, but the `iwanthue` also differently calculates the color for specified username.

The `google` selected will generate the same avatar for both, "Krzysiek" and "ksz2k" usernames given (both of them starts with letter "k"), but `iwanthue` will calculate it's md5 and then selects color, so there's huge chance that these usernames get different colors.

##### Custom palette definition

You can define your own `custom` palette:

```ruby
LetterAvatar.setup do |config|
config.colors_palette = :custom
config.custom_palette = [[120, 132, 205], [91, 149, 249], [72, 194, 249], [69, 208, 226]]
end
```

## Usage

```ruby
Expand Down
2 changes: 1 addition & 1 deletion lib/letter_avatar/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module LetterAvatar
VERSION = '0.3.6'
VERSION = '0.3.7'
end

0 comments on commit a25955f

Please sign in to comment.