• good way to choose 15 colors? Or 20, more? (adjacent colors should look

    From HenHanna@21:1/5 to All on Tue Jul 2 07:49:59 2024
    black= (0,0,0)
    white= (255,255, 255)
    blue= (0, 0, 128)
    pink= (245, 182, 193)
    green= (0, 128, 0)
    gray= (105,105, 105)
    red= (128, 0,0)
    yellow= (255, 255,0)
    cyan= (0, 255, 255)
    magenta= (255,0, 255)
    purple= ( 160, 32, 240) ------------------ that's 11 colors


    What's a good way to choose 15 colors? Or 20 colors? Or more?

    (adjacent colors should look different)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From DFS@21:1/5 to HenHanna on Tue Jul 2 13:27:21 2024
    On 7/2/2024 10:49 AM, HenHanna wrote:

    black= (0,0,0)
    white= (255,255, 255)
    blue= (0, 0, 128)
    pink=  (245, 182, 193)
    green= (0, 128, 0)
    gray= (105,105, 105)
    red= (128, 0,0)
    yellow= (255, 255,0)
    cyan= (0, 255, 255)
    magenta= (255,0, 255)
    purple= ( 160, 32, 240)  ------------------  that's 11 colors


    What's a good way to choose 15 colors?   Or 20 colors?  Or more?


    1) choose from lists of predefined colors https://www.rapidtables.com/web/color/RGB_Color.html https://www.w3schools.com/html/html_colors_rgb.asp https://excelatfinance.com/xlf/media/xlf-colindx2ws.png

    2) predefine and name your own colors manually, then pick the colors at
    random from a list

    3) generate random r,g,b values between 0 and 255, and name the
    resultant colors.

    4) generate r,g,b values in ranges known to produce greens, reds, blues, oranges, yellows, etc. You could name them consecutively: green1,
    green2, green3...



      (adjacent colors should look different)

    What are 'adjacent colors'?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From HenHanna@21:1/5 to DFS on Tue Jul 2 12:49:18 2024
    On 7/2/2024 10:27 AM, DFS wrote:
    On 7/2/2024 10:49 AM, HenHanna wrote:

    black= (0,0,0)
    white= (255,255, 255)
    blue= (0, 0, 128)
    pink=  (245, 182, 193)
    green= (0, 128, 0)
    gray= (105,105, 105)
    red= (128, 0,0)
    yellow= (255, 255,0)
    cyan= (0, 255, 255)
    magenta= (255,0, 255)
    purple= ( 160, 32, 240)  ------------------  that's 11 colors


    What's a good way to choose 15 colors?   Or 20 colors?  Or more?


    1) choose from lists of predefined colors https://www.rapidtables.com/web/color/RGB_Color.html https://www.w3schools.com/html/html_colors_rgb.asp https://excelatfinance.com/xlf/media/xlf-colindx2ws.png

    2) predefine and name your own colors manually, then pick the colors at random from a list

    3) generate random r,g,b values between 0 and 255, and name the
    resultant colors.

    4) generate r,g,b values in ranges known to produce greens, reds, blues, oranges, yellows, etc.  You could name them consecutively: green1,
    green2, green3...



      (adjacent colors should look different)

    What are 'adjacent colors'?



    black= (0,0,0)
    white= (255,255,255) .............

    from PIL import Image
    from PIL import ImageDraw

    def newImg():
    img = Image.new('RGB', (120, 120))

    for i in range(100):
    img.putpixel((10+i,10+i), (red, black, white)[i%3])

    img.save('test.gif')
    return img




    Thanks.... for what i mean by [adjacent] pls see above.




    ............good ways to choose 15, 20, or more colors in Python,
    ensuring adjacent colors look different:

    1. Colormaps:

    Import libraries:

    Python
    import matplotlib.pyplot as plt
    from matplotlib.cm import get_cmap

    Choose a colormap:

    There are many built-in colormaps in Matplotlib. Some that provide good
    visual distinction between adjacent colors include:

    viridis

    plasma

    inferno

    cividis

    coolwarm (for diverging color schemes)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to HenHanna on Tue Jul 2 21:41:12 2024
    On Tue, 2 Jul 2024 07:49:59 -0700, HenHanna wrote:

    What's a good way to choose 15 colors? Or 20 colors? Or more?

    (adjacent colors should look different)

    Something like this <https://www.deviantart.com/default-cube/art/Related-Colours-726210156>, perhaps?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From HenHanna@21:1/5 to Lawrence D'Oliveiro on Tue Jul 2 20:12:59 2024
    On 7/2/2024 2:41 PM, Lawrence D'Oliveiro wrote:
    On Tue, 2 Jul 2024 07:49:59 -0700, HenHanna wrote:

    What's a good way to choose 15 colors? Or 20 colors? Or more?

    (adjacent colors should look different)

    Something like this <https://www.deviantart.com/default-cube/art/Related-Colours-726210156>, perhaps?


    thanks... i'm surprised what i'm looking for isn't offered as default.


    (10 default colors at) https://matplotlib.org/stable/gallery/color/color_cycle_default.html

    e.g. i want to get 50 colors like this:

    (10 default colors)

    (10 default colors) a little darker (and rotated in the Color wheel)

    (10 default colors) a little lighter (and -rotated in the Color wheel)

    (10 default colors) darker still (and rotated in the Color wheel)

    (10 default colors) lighter still (and -rotated in the Color wheel)



    darker/lighter (and rotation?) doesn't work for Black/White, does it?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)