Skip to content

Commit

Permalink
add some comment
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenLYZ committed Mar 31, 2022
1 parent 1b7a840 commit 5eb792c
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ export function getContrastingColor(color: string, thresholds = 186) {

export function getAnalogousColors(colors: string[], results: number) {
const generatedColors: string[] = [];
// This is to solve the problem that the first three values generated by tinycolor.analogous
// may have the same or very close colors.
const ext = 3;
const analogousColors = colors.map(color => {
const result = tinycolor(color).analogous(results + ext);
Expand Down

0 comments on commit 5eb792c

Please sign in to comment.