I was playing around with a new project recently and wanted to figure out the complementary color of a given color. All you need for this are the RGB values of the color for which you want to find the complement.

There are lots of ways of specifying a color on the Open Web:

  • rgb(255,0,0)
  • rgb(100%,0,0)
  • #FF0000
  • #F00
  • "red"

And it's not just the 17 CSS color names, there are 147 cool-sounding extended color names like papayawhip. So given that a user can input a color in all sorts of ways, what's the right way to do this? Read the rest of this entry ...

§539 · June 27, 2009 · Software, SVG, Technology, Web · 8 comments · Tags: , , ,

In my spare time I've been having fun contributing to the SVG-edit project this last couple weeks adding really basic features like selection and dragging. The goal is a cross-browser SVG editor that you can embed in web pages that works on any modern browser. My biased definition of a modern browser: native support of SVG. I know there are quite a lot of projects out there that do an online SVG editor already. SVG-edit is still in its infancy, but that's part of the charm I found in hacking on it. Read the rest of this entry ...

§538 · June 19, 2009 · Software, SVG, Technology, Web · 17 comments · Tags: , , ,

I was impressed with the announcement of Google Wave at Google I/O two weeks ago. Thanks to being in attendance, I was able to get a sandbox account and start checking it out. Of course because there aren't a lot of people that I know on there and after getting shinied for a week doing simple things (or sometimes nothing at all), I needed to take a break. But Google Wave led to GWT which led to the idea of automating web application testing.

One of the interesting things about Google Wave is that it was implemented using the Google Web Toolkit (GWT, pronounced 'gwit' apparently). GWT is a Java-based framework that compiles your code to HTML/JS/CSS. Like a lot of folks, I was skeptical about this idea (particularly since none of the significant Google web services were built using GWT). The fact that Google has implemented a major service on top of this toolkit now gives me a sense that GWT has been put through its paces.

Anyway, after the announcement, I adjusted my second day conference schedule so that I could take in the session on Wave and GWT. As part of this talk, they mentioned how they use WebDriver to automate testing of Wave across browsers. I had never really heard about automating web app testing, so I found the notion particularly interesting. Has anybody had any success with Selenium or WebDriver on apps that use SVG or Canvas?

Really briefly I tried to use the Selenium IDE extension for Firefox to run a test on the svg-edit demo. Unfortunately it doesn't seem possible to capture the mouse click/movement on SVG elements, which means it's a non-starter for me at the moment. I signed up for an account with OpenQA and asked an unanswered question. Note that after I asked this question, the svg-edit app abandoned its use of the <object> tag in favor of inline SVG that is programmatically added to the page. Unfortunately this resulted in the same effect: Selenium IDE ignores mouse clicks within SVG elements. Bummer.

I then tried to submit a bug only to find that OpenQA's JIRA was crashing. To report THAT bug I'd have to sign up with an account at atlassian and that's just too many degrees away from where I want to be. No one was around on the #selenium channel in IRC Freenode so I gave up for now. Hot Tip: if you want to build a community, make sure basic things like signing in to your bug tracker work!

§537 · June 8, 2009 · Google, Software, SVG, Technology, Web · 2 comments · Tags: , , , , , ,