Posted on Leave a comment

SVG Attempt

Let’s start with a topic that has seen vast improvement in browsers lately.

SVG is relatively new compared to other web technologies. The first release of the language specification occurred in 2001. I was just starting high school. Less than ten years since then, support for the language is extensive, reaching even mobile devices.

My earliest attempts at SVG were reproducing GUI elements. They can be viewed by visiting my Interface Design course page. From there you can also view my homework assignments if you so desire. My final project is the topic of this post.

My partner (Adam) and I chose to make a color picker for our final project. The goal was to make a color picker which can be built into a larger application. That was the only requirement. Our first task was to research current solutions.

We looked at several color pickers in popular programs. Our color picker needed to fit in a small space and provide a wide range of colors. While swatches have a small footprint and are easy to use, they don’t provide enough choice to the user. But pickers which use a large area, like the default in Photoshop, are too large. This led us to sliders as the primary mechanism to adjust the color.

The next decision to be be made was which color model to show. We wanted one easy to understand and easy to use. RGB is the easiest to use with three variables each with 256 possible values making it our first choice. HSL and HSV are more accessible given that each presents the user with the hue which is how most people think of color. CMYK was ruled out because the color picker is intended for web use only. For the same reason, we included the hexadecimal value. In the end we included RGB and HSV sliders to gain the advantages of both.

This is when we ran into a problem. First RGB and HSV variables all have different domains. Second, the maximum value (360 hue) is greater than the amount of pixels available for the sliders. Good design dictates that sliders can reach all possible values in their domain. By shortening a slider some possible values are excluded either beyond the end or between pixels. We chose to make all sliders 200 pixels long but provide buttons to adjust the sliders in sub-pixels. This has the unfortunate side effect of destroying scale. One slider (hue) has the domain 0-359, and two (saturation and value) are 0-100, and three sliders (RGB) are 0-255; but every slider is 200 pixels long. We also added variable gradients to show how moving a particular slider will affect the color.

The end result can be thought of more like a prototype than a finished product. A major oversight was labels. The sliders from left to right are as follows: Red, Green, Blue, Hue, Saturation, and Value.

Color Picker

Be on the lookout for a post about the code.

Posted on Leave a comment


This is now the third blog I’ve started. The first one was my personal blog with no real focus. Many of the posts in that blog are unrelated to each other. They are mostly random topics I had an opinion about. The second blog was actually started by Slippery Rock University. It was an attempt by the school admissions department to give prospective students a view of the university from a student’s perspective. It focused on student life at SRU with posts mainly about campus activities.

This blog is going to focus on more technical topics, like my programming projects. It is motivated by the lack of interest on my other blog. The technical posts aren’t quite as popular as the others. To start things off I will be discussing some of my school projects which are still relevant. Most are, but some were meant to reinforce topics which had already been learned. While separate assignments are useful in a classroom setting, here they can be combined into one post/discussion.