Skip to content
Discussion options

You must be logged in to vote

Hi @rbozan, thanks for asking. You were right that there was no way to do it, the shuffle always ran. It seemed like such an obvious gap once you pointed at it that it went straight into 10.5.0, which I just published.

The new option is *ColorOrder. Set it to fixed and your colors stay exactly as you passed them. Your flag example, on bottts (its color group is called base, so the option is baseColor):

const avatar = new Avatar(style, {
  seed: 'Felix',
  baseColor: ['0055a4', 'ffffff', 'ef4135'],
  baseColorFill: 'linear',
  baseColorAngle: 0,
  baseColorOrder: 'fixed',
});
https://api.dicebear.com/10.x/bottts/svg?seed=Felix&baseColor=0055a4,ffffff,ef4135&baseColorFill=linear&baseColorAn…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@rbozan
Comment options

@rbozan
Comment options

@FlorianKoerner
Comment options

Answer selected by FlorianKoerner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants