Closed Erol444 closed 2 years ago
Hi @Erol444 , thanks for using distinctipy! There are two ways to get the same colours on repeated runs:
rng
parameter of distinctipy.get_colors
(see docs here, introduced in version 1.2.0).Do these fit what you need?
Thanks @jack89roberts , that's exactly what I needed! Sometimes I should follow the RTFM rule 😅 Thanks again, Erik
Start with
why
I believe this would be useful in AI field - where you have X number of classes as an output of an eg. object detection. In that case, it's much better to have bounding boxes with the same color each time you run the program - people get used to that color, so they don't need to look at the label of some object (to determine whether detector's output is correct).
Move to
what
:Add an option to always get the same palette for the same number of colors.
End with
how
:So it would be something similar to what seaborn does;
Issue with seaborn is that it's huge and has tons of dependencies, which isn't ideal if you just want to get color palettes. If you are using random numbers to generate colors, maybe we could insert seed num for these, so the output color palette would always look the same.
Thoughts?