File tree 2 files changed +8
-10
lines changed
2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -109,14 +109,14 @@ func (p *Palette) ExtractAwesome() map[string]*Swatch {
109
109
if darkvib , ok := res ["DarkVibrant" ]; ok {
110
110
h , s , l := rgbToHsl (int (darkvib .Color ))
111
111
l = TARGET_NORMAL_LUMA
112
- res ["Vibrant" ] = & Swatch {Color : Color (hslToRgb (h , s , l ))}
112
+ res ["Vibrant" ] = & Swatch {Name : "Vibrant" , Color : Color (hslToRgb (h , s , l ))}
113
113
}
114
114
}
115
115
if _ , darkvib := res ["DarkVibrant" ]; ! darkvib {
116
116
if vib , ok := res ["Vibrant" ]; ok {
117
117
h , s , l := rgbToHsl (int (vib .Color ))
118
118
l = TARGET_DARK_LUMA
119
- res ["DarkVibrant" ] = & Swatch {Color : Color (hslToRgb (h , s , l ))}
119
+ res ["DarkVibrant" ] = & Swatch {Name : "DarkVibrant" , Color : Color (hslToRgb (h , s , l ))}
120
120
}
121
121
}
122
122
return res
Original file line number Diff line number Diff line change @@ -87,11 +87,9 @@ func index(w http.ResponseWriter, r *http.Request) {
87
87
case "image/jpeg" :
88
88
case "image/png" :
89
89
default :
90
- if err != nil {
91
- setStatus (400 )
92
- data .Error = "JPG/PNG only plz."
93
- return
94
- }
90
+ setStatus (400 )
91
+ data .Error = "JPG/PNG only plz."
92
+ return
95
93
}
96
94
97
95
if max := r .FormValue ("maxColors" ); max != "" {
@@ -217,7 +215,7 @@ input[type="text"] {
217
215
</form>
218
216
{{ if .Error }}
219
217
<hr>
220
- <h3>Error: {{.Error}}</h3>
218
+ <h3>Error: {{.Error}}</h3>
221
219
{{ end }}
222
220
{{ if .Response }}
223
221
<hr>
267
265
</figure>
268
266
<textarea readonly onclick='this.select()'>{{.Stylesheet}}</textarea>
269
267
{{ if .Missing }}
270
- <h3>If color swatches are missing, try increasing <code>maxColors</code> in the text field above.</h3>
271
- <h2>{{.Benchmark}}</h2>
268
+ <h3>If color swatches are missing, try increasing <code>maxColors</code> in the text field above.</h3>
272
269
{{ end }}
270
+ <h2>{{.Benchmark}}</h2>
273
271
{{ end }}
274
272
</body>
275
273
</html>`
You can’t perform that action at this time.
0 commit comments