letter_avatar 0.1.5.1 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/letter_avatar/avatar.rb +5 -1
- data/lib/letter_avatar/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bba34004fd9198351087e9bf2a684a11b4d6593c
|
4
|
+
data.tar.gz: 95b0b43bb13237a9ec432bd54c3f785494bced46
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c5f9c0ae4d685b60b1063b857b228c5116e48c6e2c3d7412a18f65f643845040ee2a3ae1ff58b2f69b43b038991762b1acd3450bb69a0b1f2e949ad77b447ab
|
7
|
+
data.tar.gz: 2ddd0b96509c758bb027aaddf8f838c6ea6bc723d75a7a8559376ea6440ea31c0323ce1a7e3c332b5c5f1ef475d35d669a05aa63f951a9b34199b1ad80bdacf9
|
data/lib/letter_avatar/avatar.rb
CHANGED
@@ -79,7 +79,7 @@ module LetterAvatar
|
|
79
79
|
-weight 300
|
80
80
|
-fill '#{FILL_COLOR}'
|
81
81
|
-gravity Center
|
82
|
-
-annotate
|
82
|
+
-annotate #{annotate_position} '#{letter}'
|
83
83
|
'#{filename}'
|
84
84
|
)
|
85
85
|
|
@@ -95,6 +95,10 @@ module LetterAvatar
|
|
95
95
|
filename
|
96
96
|
end
|
97
97
|
|
98
|
+
def annotate_position
|
99
|
+
LetterAvatar.colors_palette == :google ? '-0+5' : '-0+10'
|
100
|
+
end
|
101
|
+
|
98
102
|
def darken(color,pct)
|
99
103
|
color.map do |n|
|
100
104
|
(n.to_f * pct).to_i
|