Hi all; Aliso here. As some of you have surely noticed, I’ve been somewhat absent from my own blog lately. I’ve also been incommunicado to some extent—my sincere apologies to anyone who has sent me a message and been waiting for a response.
Let me explain.
In the past month, a lot has been going on. I was fired from my job at Brave New Media, and I got a job as a software engineer at The Nerdery in Bloomington, MN. I just finished my first week as a Nerdery Nerd, and it’s even more amazing than I ever thought it would be. I won’t go into detail on the Brave New Media situation—people close to me know what happened, and anyone who is curious should feel free to ask. It wasn’t exactly amicable and I don’t want to go spouting things on my blog until I can be completely objective about it. (Even then, I might not “spout” anything about the matter. We’ll see.)
Anyway, the new job is so fantastic, awesome and wonderful that it warrants a whole other post that I’m sure I’ll write this weekend. I just wanted to give a quick hello and explain my recent lack of blog-posty goodness.

Standing Desk 1.0 Beta
I’ve read a lot lately about how sitting for prolonged periods of time every day can shorten your life. While I’m skeptical, it seems like common sense that sitting down all the time just isn’t good for you. As programmers, we know what it feels like to only get out of our chairs once every few hours (on a good day).
An idea that seems to be making the rounds right now is using a standing desk on a regular basis instead of a normal one. It’s intriguing, and I’ve thought about it for a while now… I figure it’s time to give it a shot, at least for a few days.
Since this is something I’m not entirely sure about, I’m using the “cheap-as-free” standing desk conversion kit. It consists of a plastic bin I store cables in, a black box to provide a mousing surface (it’s the box that Final Cut Studio used to come in) and a book to put under the keyboard since the lid of the bin has raised edges. My iMac does a great job of tilting up to a comfortable angle without having to set the computer on top of something.
This may not last, or it may be completely awesome and cause me to look for a more permanent (and probably non-free) solution. We’ll see what happens!
For those that have read the articles on sitting making you 54% more likely to have a heart attack, please remember that’s 54% more than whatever risk you already have. So if you have a 1% risk normally, sitting all day puts you at 1.54%. Don’t freak out. Fear sells news.
The updates to the admin UI in WordPress 3.2 are pretty great. I love the new interface. The only thing I didn’t love was the loss of the blocky header and footer of the admin section—that was the easiest and fastest way to customize the look of the admin area for client’s sites (or for fun). With the admin menu being separated from the rest of the page in version 3.2, though, I can customize the colors of that instead, and it still looks pretty darn slick.

It looks simple enough, but when you take a closer look at the CSS (or just at the menu itself) you realize there are lots of different elements colors need to be applied to:
- Menu background
- Menu header borders
- Menu header link text
- Separators
- Selected background
- Selected header borders
- Selected header link text
- Selected header text shadow
And to account for minimized menus with pop-out submenus:
- Pop-out menu headers
- Pop-out menu borders
- Pop-out menu header link text
- Selected pop-out menu header
- Selected pop-out menu link text
I went through and customized all of these things with simplistic colors (#069, etc.) and ended up with a pretty sweet menu. Then I wanted to change the color scheme, and I realized there were a zillion (24 actually) places I needed to change colors to make that happen.
This is by no means impossible, but it’s kind of a pain in the ass. So I did some Googling and found a great PHP script to generate CSS color variations from one base color. I had to modify the script a little (I don’t have PEAR installed on my dev server) but I ultimately got it to work.
Here’s the beginning of the stylesheet, so you can see how it works:
<?php
header( 'Content-type: text/css' );
require_once( '_inc/csscolor.php' );
$base = new CSS_Color( '3B4C7A' );
$selected = new CSS_Color( 'BB7101' );
?>
/* @group Admin Menu Coloring
----------------------------------------------- */
/* Background color of entire menu */
#adminmenuback, #adminmenuwrap, #adminmenu .wp-submenu .wp-submenu-head {
background: #<?php echo $base->bg['0']; ?>;
}
First I’m tricking the browser into thinking this PHP file is really a CSS file. I’m sneaky like that. Then I’m including the modified color script.
Next I define two colors: “base” for the overall menu look and “selected” for the current menu header.
From here on out, I can use those two variables to print variations of the original color. The script returns a “bg” component (the background color) and a “fg” component (the foreground color – white or black, depending on the shade of the background). You can go from -5 to +5 in range (see the original script’s website for a great visual example). This worked GREAT.
If you want to download the whole package (CSS/PHP file + CSS_Color class file), here you go:
WordPress 3.2 Admin Menu Custom Colors
To use it in your theme, put both of the files (admin-menu.css.php and csscolor.php) in your theme folder, and add this code to your functions.php file:
add_action( 'admin_print_styles', 'atg_slick_menu_style' );
function atg_slick_menu_style() {
wp_register_style( 'slick-admin-menu', get_bloginfo( 'stylesheet_directory' ) . '/admin-menu.css.php' );
wp_enqueue_style( 'slick-admin-menu' );
}