Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

BOFH excuse #417: Computer room being moved. Our systems are down for the weekend.


comp / comp.lang.python / Re: good way to choose 15 colors? Or 20, more? (adjacent colors should look different)

SubjectAuthor
* good way to choose 15 colors? Or 20, more? (adjacent colors should look differenHenHanna
+* Re: good way to choose 15 colors? Or 20, more? (adjacent colors should look diffDFS
|`- Re: good way to choose 15 colors? Or 20, more? (adjacent colors should look diffHenHanna
`* Re: good way to choose ... (adjacent colors should look different) (Posting On PLawrence D'Oliveiro
 `- Re: good way to choose ... (adjacent colors should look different) (Posting On PHenHanna

1
Subject: good way to choose 15 colors? Or 20, more? (adjacent colors should look different)
From: HenHanna
Newsgroups: comp.lang.python
Organization: A noiseless patient Spider
Date: Tue, 2 Jul 2024 14:49 UTC
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: HenHanna@devnull.tb (HenHanna)
Newsgroups: comp.lang.python
Subject: good way to choose 15 colors? Or 20, more? (adjacent colors should
look different)
Date: Tue, 2 Jul 2024 07:49:59 -0700
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <v6142n$1m6mo$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 02 Jul 2024 16:50:00 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="aebd87cf5dc6d0896a340783f4e437df";
logging-data="1776344"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19P06DqfdFYhTK1tIWn6dGYv04soef6gjE="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:SoHk+4Tj1OZxUG4N3Zq6ek3lttQ=
Content-Language: en-US
View all headers

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)

Subject: Re: good way to choose 15 colors? Or 20, more? (adjacent colors should look different)
From: DFS
Newsgroups: comp.lang.python
Date: Tue, 2 Jul 2024 17:27 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!panix!weretis.net!feeder9.news.weretis.net!border-1.nntp.ord.giganews.com!border-4.nntp.ord.giganews.com!nntp.giganews.com!news-out.netnews.com!postmaster.netnews.com!us14.netnews.com!not-for-mail
X-Trace: DXC=:n54KYVdOkFi;4P:H19W_GHWonT5<]0TMQ;nb^V>PUfF=AnO\FUBY[@nF54O@^\1?DlD2h2PDcNQDLQ^D7JJN18AankHQ>:kCVBOT>gi^X=X_ACGm4YP8f00J
X-Complaints-To: support@blocknews.net
Date: Tue, 2 Jul 2024 13:27:21 -0400
MIME-Version: 1.0
User-Agent: Betterbird (Windows)
Subject: Re: good way to choose 15 colors? Or 20, more? (adjacent colors
should look different)
Newsgroups: comp.lang.python
References: <v6142n$1m6mo$1@dont-email.me>
Content-Language: en-US
From: nospam@dfs.com (DFS)
In-Reply-To: <v6142n$1m6mo$1@dont-email.me>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 39
Message-ID: <66843879$0$980$882e4bbb@reader.netnews.com>
NNTP-Posting-Host: 127.0.0.1
X-Trace: 1719941241 reader.netnews.com 980 127.0.0.1:47113
View all headers

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'?

Subject: Re: good way to choose 15 colors? Or 20, more? (adjacent colors should look different)
From: HenHanna
Newsgroups: comp.lang.python
Organization: A noiseless patient Spider
Date: Tue, 2 Jul 2024 19:49 UTC
References: 1 2
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: HenHanna@devnull.tb (HenHanna)
Newsgroups: comp.lang.python
Subject: Re: good way to choose 15 colors? Or 20, more? (adjacent colors
should look different)
Date: Tue, 2 Jul 2024 12:49:18 -0700
Organization: A noiseless patient Spider
Lines: 92
Message-ID: <v61ljv$1p0lj$2@dont-email.me>
References: <v6142n$1m6mo$1@dont-email.me>
<66843879$0$980$882e4bbb@reader.netnews.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 02 Jul 2024 21:49:22 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="aebd87cf5dc6d0896a340783f4e437df";
logging-data="1868467"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/CaIqTSwaDi6YEUSmxiW/8ode2Z8aK6ps="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:fjk3E+BgrMopGConDcguM1Awkck=
In-Reply-To: <66843879$0$980$882e4bbb@reader.netnews.com>
Content-Language: en-US
View all headers

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)

Subject: Re: good way to choose ... (adjacent colors should look different) (Posting On Python-List Prohibited)
From: Lawrence D'Oliv
Newsgroups: comp.lang.python
Organization: A noiseless patient Spider
Date: Tue, 2 Jul 2024 21:41 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.lang.python
Subject: Re: good way to choose ... (adjacent colors should look different)
(Posting On Python-List Prohibited)
Date: Tue, 2 Jul 2024 21:41:12 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 9
Message-ID: <v61s5o$1q6mr$1@dont-email.me>
References: <v6142n$1m6mo$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 02 Jul 2024 23:41:12 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="f0fce2a17c28243633ab8e4185ca024d";
logging-data="1907419"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18QPr/bSd/BEPiQE0YFCjD8"
User-Agent: Pan/0.158 (Avdiivka; )
Cancel-Lock: sha1:LFcxuNvGLnFA4PF3B8NIYel9f0w=
View all headers

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?

Subject: Re: good way to choose ... (adjacent colors should look different) (Posting On Python-List Prohibited)
From: HenHanna
Newsgroups: comp.lang.python
Organization: A noiseless patient Spider
Date: Wed, 3 Jul 2024 03:12 UTC
References: 1 2
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: HenHanna@devnull.tb (HenHanna)
Newsgroups: comp.lang.python
Subject: Re: good way to choose ... (adjacent colors should look different)
(Posting On Python-List Prohibited)
Date: Tue, 2 Jul 2024 20:12:59 -0700
Organization: A noiseless patient Spider
Lines: 33
Message-ID: <v62fjt$21017$1@dont-email.me>
References: <v6142n$1m6mo$1@dont-email.me> <v61s5o$1q6mr$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 03 Jul 2024 05:13:02 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="122f085a497d315e1e2c18acf461b41e";
logging-data="2129959"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+FSYeyknmtv+hof7AqMvsgZY5DsSyNlpA="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:JiAkoDAPAUp7aWG8M/5LqzKu0dw=
In-Reply-To: <v61s5o$1q6mr$1@dont-email.me>
Content-Language: en-US
View all headers

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?

1

rocksolid light 0.9.8
clearnet tor