I really enjoy playing this silly game called House Flipper. You can decorate, and now build, houses to your heart’s content, and if you edit the json file, money is no object. The r/houseflipper subreddit is really delightful. It’s a nice community with posts of decorated spaces and questions about how to unlock all the achievements. Recently a number of users have been posting their tips for coming up with new paint palettes or design schemes using random color or idea generators. There’s only one problem with using something like adobe color and that’s that they don’t have the in-game palette.
So I did what any completionist would do, I methodically painted a wall with stripes of color, four at a time, during in-game sunny daylight to get consistent lighting, and took screenshots. Then I used 3D Paint to lift the colors and put the corresponding color names and hex values into excel where I used some overly complicated concatenation to auto format the list into an array of arrays. After getting my array of arrays I used a random number generator to pick an array and plug in the values into the web page. Easy! The CSS only took a couple of hours – I needed to refresh my memory on creating a grid layout. And the only thing left to do was write the JavaScript.
2.5 days later and what I thought would take about 1-2 hours the project was complete. I code as a hobby and when you’re not using it daily it just slips right out of your head. Or, maybe that’s just me? ¯\_(ツ)_/¯ Anyway, I have it running in codepen, link below. (You’ll have to click through to see it in action as CodePen doesn’t seem to play well with WordPress but you can see a screenshot below).
Codepen: Randomize some Colors