Since you're doing magic colors anyway you could have just computed the hex values for those colors