U and I :: Matthew Mitchell
For my U and I project I made an RGB color picker. I actually needed one of these for some web UI work I was doing, so it’s pretty cool that I was able to make one to my specifications.
A few features of the app:
- There are 3 color sliders: R, G, and B. Moving these will change the background color
- There are 3 radio buttons: R, G, and B. Selecting one of these will allow you to tap the – and + buttons to fine-tune your RGB color
- Aligned with the radio buttons are integer values for your RGB color, that you can insert into whatever program you are making a color change with
- Once G gets to a certain hue, white text becomes hard to read on it. R and B can be at whatever value, but as soon as G passes a certain threshold, you can’t read the white text anymore. So after G = 190, the text switches to Black so that you can still read your results!
For future iterations of this app, I would enable a Save functionality that allows you to name the color, and it’ll save the RGB values for you. A grid layout can show you all of the colors you have saved, and tapping on a color will show you the RGB values for it.
I would also optimize my code further so that color change requests would go through a controller…in an MVC-like structure. Right now, there are a ton of conditional statements to change text colors. It hurt my soul to write code like that, and I’m working on a fix for it.
Here are two screenshots illustrating my app: