Inspiration
My wife and I were playing "I Spy" with our kids when this idea came. I wanted to put my own spin on the game.
What it does
This lens randomly selects one of nearly 30,000 colors for you to find. You then have 10 seconds to lock in an answer and see how close you came. It gives you a side-by-side comparison as well as a percent match between your selection and the goal color.
How we built it
I used the Procedural Texture Provider to do the color sampling. I also spent a bit of time reading about how to compare two colors - it isn't as easy as simply comparing the component red, green, and blue values of a color. We perceive color differently than how they are represented by a computer so the calculation has to be done differently. That was fun to learn about.
Challenges we ran into
My first challenge was figuring out the specific game mechanics. Originally I was going to have varying levels of difficulty with each level spanning a different subset of colors, but that started getting too complex so I opted for a simpler design to let you jump right in to the lens.
My next challenge had to do with the Procedural Texture Provider that I was using to sample the colors. On a previous lens I was able to update it on every frame, but Lens Studio seems to have changed how that is done behind the scenes since then so I ran into memory issues. Fortunately I was able to solve it by using the material editor to create the realtime preview of what color you are sampling and I only do the color sampling when you lock in your color.
Accomplishments that we're proud of
I'm proud of figuring out a simple game mechanic that ends up being somewhat addictive (in a good way) because there are so many colors with so many interesting names that you can get lost in the cycle of seeing which color comes next.
What we learned
I learned to do on-device testing a little earlier in the process to avoid last minute surprises. I also learned a lot more about how we perceive color.
What's next for Color Quest
I'm not sure. I might take the color sampling idea and look into maybe applying it to fashion or makeup.
Built With
- lensstudio
Log in or sign up for Devpost to join the conversation.