Skip to content
Discussion options

You must be logged in to vote

sorry, no. For short lists, it might be easiest to simply use a variant with weights. There is no clean solution for longer weights but you can try using a yaml file like so:

##### colours.yaml #####
colours:
  - |
    {
        0.1:: red,
        0.3:: blue
        0.6::green
        ....
    }

Replies: 1 comment 3 replies

Comment options

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

akx Apr 23, 2023
Collaborator

@Kadah
Comment options

@adieyal
Comment options

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