Colorful buttons

While working with the Contacts extension by @DeveloperLeo and Dynamic components by @yusufcihan , I forgot to change the background color of Button to Text, and after indexing all the value of number to each button I got the unexpected and beautiful result.

There were some colors which I wanted to create but was unable to create in Kodular.

Here’s the block:

4 Likes

can you give the list of the variable numberlist?
btw, if u need to use hex to change backgroud colour, use colour unities component

1 Like

I know I can use color utilities component. It got generated accidentally.
The number list is a contact number of many person so I can’t show it. I am sorry.
Well, you can try the contact number saved in your phone to generate these colors. :slight_smile:

I may not cuz I don’t make apps about contact

Just for the curiosity, you can try this. :sweat_smile: :grimacing:

It seems that colors here are represented/generated with some kind of number combination. I don’t have much idea about this but when you Do It on any color block, you see this number combination. For example :point_down:

color

Ofc. Therefore it return some random colour whe inputing different numbers

Yes. Colors were generated by many different combinations of number. :sweat_smile:

Ya but what exactly this number combination called? I know, that color can be generated with RGB, Hex, etc. But is there any other pattern/combination (like described in my above reply’s screenshot) that I am missing out?

I think it is AI2 own color scheme
http://appinventor.mit.edu/explore/app-inventor-color-chart

1 Like

The mobile number which I had in my contacts has a total of 12 digits (including code +91). So maybe, the color are being generated using those digits.

12 digits can be divided into 4 parts. Suppose a number, 911234567890. We can divide it as (911) (234) (567) (890). It may happen that app is considering R = 911, G = 234, B = 567, Alpha = 890 and hence these colors are being produced.

I am not sure. It is just my point of view. :wink:

Hmmm. That’s possible, but

The codes are in 6 or 7 digits. It seems interesting.

Nope, it is 2 to 8 digits

Great Info!!! One more thing added to my knowledge bucket :sunglasses: @WatermelonIce

Nope I don’t think so :thinking: @golumaths100

1 Like

The maximum number of RGB is 255…
And alpha is 1

No it’s not. And HTML only

defines 16 named colors

But I doubt that my answer is wrong.
I can’t find -834762

in the colour chart

I think Kodular has its own colour chart too?

Yes this is possible… :thinking:

See my explanation about the colour codes here:

2 Likes