PowerApps: BabyColors

Just for fun…

My 13-month-old granddaughter loves to listen to music and watch videos on our phones (though of course she’s only allowed limited “screen time”). But she’s too young yet to realize that if she touches the screen, YouTube stops or exits. So I was trying to think of something she could play with and it didn’t matter where she touched the screen. I also wanted her to start to understand cause and effect – that if she touches the screen, something will happen.

The BabyColors app is what I came up with… It’s very simple, and only took me about 20 minutes to think of and make, but I thought it was kind of a nifty demo, so I’m sharing here. The idea is that the whole phone screen changes colors randomly every time you touch it.

I started with a blank app (there are no connections to anything), and added a Button which covers the entire screen, and has no text. Initially, I entered this formula in the OnSelect property of the Button:


This creates and sets a global variable called ScreenColor to a random color each time the full-screen button is clicked – that is, each Red/Green/Blue value is a random number from 1 to 255 (the 1 at the end is the Alpha value, which I have no need to change in this case). That was cool, but I noticed that while I was actually pressing the “button” (i.e. anywhere on the screen), the screen flashed white, which I thought would be disturbing for a baby, and also she’s likely to continue to touch the screen, which would make it white most of the time. In addition, the screen was black when the app was first opened. So I made a couple of changes:

  • I copied the above ScreenColor Set formula to the OnStart property of the whole screen. This randomly generates a color when the app is opened, and stores it in the ScreenColor variable.
  • On the Button, I changed the Fill property from the default of RGBA(62,96,170,1) [which is a shade of dark blue] to ScreenColor, so it begins with the color which was set when the app opened.
  • Also on the Button, I changed the PressedFill property from Button1.Color to ScreenColor as well, to eliminate the flash of white when the button is being pressed.

And that’s it! A grown-up must open the app, but after that, the baby can touch anywhere on the screen, and the color will change. The only way to exit the app is to swipe from the left, which (I hope) won’t be likely to happen often by accident.

I’ve recorded a short video showing how the app is created and the end result:

Initial baby user testing was positive 🙂 … next up, I want to think of some ways to add sound or action in a very basic way.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.