Strange colors
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 9731
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Strange colors
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
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
Last edited by dunbarx on Wed Apr 10, 2024 6:06 pm, edited 3 times in total.
-
- Livecode Opensource Backer
- Posts: 9445
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Strange colors
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?
-
- VIP Livecode Opensource Backer
- Posts: 9731
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Strange colors
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
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
-
- Livecode Opensource Backer
- Posts: 9445
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Strange colors
No: you are confusing the threads. The 'funny colors' thread is not the one you refer to.
-
- VIP Livecode Opensource Backer
- Posts: 9731
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Strange colors
Ah.That was over there, eh?
Craig
Craig
-
- Livecode Opensource Backer
- Posts: 9445
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Strange colors
Here's something far, far less fancy, and far, easier for bottom feeders like me to understand:
- https://www.swaddorset.org/bottom-feede ... -position/
- -
Each square is set to a single integer colour . . .
- https://www.swaddorset.org/bottom-feede ... -position/
- -
Each square is set to a single integer colour . . .
- Attachments
-
- Kullerz.livecode.zip
- Stack.
- (6.96 KiB) Downloaded 20 times
-
- Livecode Opensource Backer
- Posts: 9445
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Strange colors
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.
------
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.
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.
------
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.
-
- VIP Livecode Opensource Backer
- Posts: 9731
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Strange colors
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
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