Generating color ranges in Python

后端 未结 4 1538
失恋的感觉
失恋的感觉 2020-12-13 01:18

I want to generate a list of color specifications in the form of (r, g, b) tuples, that span the entire color spectrum with as many entries as I want. So for 5 entries I wou

4条回答
  •  粉色の甜心
    2020-12-13 01:49

    Color palettes are interesting. Did you know that the same brightness of, say, green, is perceived more intensely than, say, red? Have a look at http://poynton.ca/PDFs/ColorFAQ.pdf. If you would like to use preconfigured palettes, have a look at seaborn's palettes:

    import seaborn as sns
    palette = sns.color_palette(None, 3)
    

    Generates 3 colors from the current palette.

提交回复
热议问题