Vivaldi Color Changer Service
by Sirfredrick
Oct 26, 2018
Photo by Nhu Nguyen on Unsplash
Soon after installing and using Vivaldi exclusively, the 1.5 update came out. I saw how cool it was to have a RGB setup that syncs with your web browser. I investigated obtaining a Phillips Hue Bridge for my own setup when an amazing idea came; Vivaldi might be able to be modified to bring this functionality to any RGB setup. I was already planning on building my first computer (but earning money for that took a few years). Once I had settled on a motherboard company, Gigabyte, I set out to plan how I would combine Vivaldi’s customizability with Gigabyte’s RGB Fusion API.
General Plan
The general idea is that a Vivaldi JavaScript mod would grab the color in hexadecimal and push it to a service called PubNub. PubNub is a network that near instantaneously transfers data from one program to the next. The data is then sent back to the computer through a Windows Service which is identified by having the same subscribe key as the mod. The service uses a C# version of the RGB Fusion API written by Tyler Szabo. The API tells the motherboard to change the colors to the hex value sent. This idea seemed feasible, but it would take some time and work.
Executing the Plan
Around April, when the computer was freshly built, I began work on this project. You will learn more about what I learned from each part of this project in later blog posts. I asked the amazing Vivaldi Community for help with the Vivaldi mod since I had never written one. With their help, I was able to grab the color from the active tab. I then used a PubNub JavaScript file that allowed me to send it off to their network. Afterwards, I began writing the C# Windows Service. I decided to use Topshelf because it allows you to easily debug a Windows Service by running it as a Console App. After I finished that, I began work on the installer.
Why did it take so long?
If you have ever worked on a coding project you know that the answer is never simple. I thought I could handle writing an MSI installer. The problem is, they are a pain to write. I got part of the way through writing it but getting the publish and subscribe keys from user input to install was frustrating. I put the project on hiatus for the summer and took a break from the coding life.
What can this program do?
This program allows you to have the motherboard on your computer change based on the main color of the content of the webpage you are on. My favorite part however is the resuability of the code. I want to make this code work for any motherboard brand as well as have a Linux version if possible. If you know anything about coding and want to help with the project, look on the Github page for planned features and start working on one. Pull requests are warmly welcomed.
I want to use it right now!
The easiest way to install the project is to go to the Github page and download the binaries. You can then follow the instructions in the README file. Please note this project only works for Gigabyte RGB Fusion compatible motherboards running on a Windows Operating System.
I hope you enjoyed the time and effort that went into this project. If you want to hellp improve this project look on Github for a list of planned features and make a pull request; they are always welcome! Also, see the next blog post for more information about the individual parts of this project!
– Sir Fredrick