Page 1 of 1

Strange colors

Posted: Wed Apr 10, 2024 3:55 pm
by dunbarx
All.

This post is based on an earlier thread here (of low life expectancy) about the idea that the backColor of a control can be an integer. This is, er, not well documented.

This automated sample stack sets the backColor of a control to all the integers up to 260. I went above 255 just to see what would happen. Integers above 255 are black.

It is a show. The progression seems to visually repeat, but although the control seems to show the same sequence of colors, they successively darken. Also, the timing of each "progression" is the same for six "passes", but then, around the 210 mark, changes.

It is interesting to see, if one examines the sorted output field line by line, how the number "51" seems to be of interest. Note that 255 mod 51 = 0. Hmmm.

I always use "42".

One handler in the button "Begin".

Craig
strangeColors.livecode.zip
(2.38 KiB) Downloaded 21 times

Re: Strange colors

Posted: Wed Apr 10, 2024 4:54 pm
by richmond62
Why should your previous thread have a low life expectancy (unless you were expecting me to respond and you consider me a low life ROFL). Surely it would have been sensible to put your message here, err, there?

Re: Strange colors

Posted: Wed Apr 10, 2024 6:02 pm
by dunbarx
Richmond.

You are no lower a life form than me. I am smug about that.

Heather said so, in that thread. Scotland (rightly) does not want the two forums to mix their posts, or even reference them between each other.

Craig

Re: Strange colors

Posted: Wed Apr 10, 2024 6:36 pm
by richmond62
No: you are confusing the threads. The 'funny colors' thread is not the one you refer to.

Re: Strange colors

Posted: Wed Apr 10, 2024 7:15 pm
by dunbarx
Ah.That was over there, eh?

Craig

Re: Strange colors

Posted: Thu Apr 11, 2024 10:16 am
by richmond62
Here's something far, far less fancy, and far, easier for bottom feeders like me to understand:
-
bFeeder.jpg
bFeeder.jpg (9.87 KiB) Viewed 575 times
https://www.swaddorset.org/bottom-feede ... -position/
-
SShot 2024-04-11 at 12.09.15.png
-
Each square is set to a single integer colour . . .

Re: Strange colors

Posted: Thu Apr 11, 2024 11:53 am
by richmond62
Not sure if these are of any interest or use at all:

https://gist.github.com/callumlocke/41b ... 90f07c2d96

" convert three r,g,b integers (each 0-255) to a single decimal integer (something between 0 and ~16m)"

https://www.syncfusion.com/faq/windowsf ... vice-versa

ANYWAY . . . what IS obvious is that colours are defined by single integers in some places. Although, admittedly, that comment is fairly crass and on little value. 8)

------
Irrelevant wibble following:
------

"If a tree falls in the 16-6340 TPX Classic Green forest, and nobody's there to hear it, can Pantone really sue the forest? "

https://www.reddit.com/r/GIMP/comments/ ... ?rdt=35631

That comment really tickled me pink. 8)

Re: Strange colors

Posted: Thu Apr 11, 2024 2:28 pm
by dunbarx
Richmond.

Glad to see that we are both willing to work hard at anything but our work.

You can see the pseudo-repetition every 36 "passes", though getting darker as you go. And the whole thing changes after six such, with a gray-scale sequence at the very end.

All this was just to explore the fact that integers can be valid (or at least non-error) color references, and is not documented. But is there anything of interest or value here at all?

Craig