Way back in January of 2008 and again in 2009 I mentioned the colors in OneNote can appear much more bright if you adjust the brightness and gamma settings on your monitor. One of our monitors was so out of whack that we even thought we were seeing a bug at one point. I tried to fix this on a monitor I have that is shared on four different machines, and each video card needed different settings. I eventually gave up trying to tweak the hardware, and started thinking about how to work around this. I really want more differentiable colors (at least, literally, in my eyes). One thing finally led to another and when I was looking at the schema for OneNote 2007 I saw this attribute on a section:

<one:Section name="Tips" ID="guid" path="C:\...\Tips.one" color="#F6B078" xmlns:one="http://schemas.microsoft.com/office/onenote/2007/onenote">

(For those of you conversant with XML, you can probably guess I'm going to write a toy to change the value of this attribute for a given section. Your guess would be right.)

That color attribute is the color of the section. In this case, it is Orange (and the section is the Tips section from OneNote 2003 that is still on my machine somehow. I never had OneNote 2003 on this machine that I can remember - maybe it was preinstalled? Hmm…). Anyway, I was looking at that format and realized it could be changed. It looked like the color format string was the familiar Red, Green and Blue format with each value being 0-255 (in hex, though, so 00-FF). Sure enough, after checking the schema reference, that is exactly the format:

pattern = #[a-fA-F0-9]{6}|none|automatic

So I reused my old text importer to populate a tree view control with section names and added the default Visual Studio color chooser control. I added a little preview to show the how the font will look with the color you choose, and gave a Commit button. Throw in my old red icon for the OneNote 2007 logo, give it a good name (OneNote Section Color Overrider - OSCO) and here's what you have:

clip_image001

I made red the default color as the background just so you know it is doing something. I tried White as the default but it simply was hard to tell what to expect. It will update to the selected section color when you choose a section.

Using it should be fairly self explanatory. You browse to the section whose color you want to change, click the Choose Color button to get the standard color chooser:

clip_image002

If you want to define your own color, select Define Custom Colors(I already did before getting that screen shot) and move the arrow around until you find the color you like. Add to custom colors, select that custom color and click OK. The preview will show the color and when you click Commit, it gets applied.

OneNote will need to redraw to show the color, so either navigate to the section or from and back to it.

Here's what this Red will look like:

clip_image003

Compare to the default red:

clip_image004

I like the jelly bean colors. I hope you do too!

The download is below my signature. It's less than 35K and is just the executable file. I'll post the code for this next time since the blog limits me to just one file attachment per post.  If you want it before next week, just email me and I can send you the compressed files.

And this only works for OneNote 2007 for now. I need to update it for 2010 - stay tuned.

Questions, comments, concerns and criticisms always welcome,

John