Generate distinctly different RGB colors in graphs

前端 未结 12 1218
故里飘歌
故里飘歌 2020-11-30 16:51

When generating graphs and showing different sets of data it usually a good idea to difference the sets by color. So one line is red and the next is green and so on. The pro

12条回答
  •  -上瘾入骨i
    2020-11-30 17:41

    You could get a random set of your 3 255 values and check it against the last set of 3 values, making sure they are each at least X away from the old values before using them.

    OLD: 190, 120, 100

    NEW: 180, 200, 30

    If X = 20, then the new set would be regenerated again.

提交回复
热议问题