Just don't do it on company dime and company time. This is what weekends are for, and it'd be up to the company to prove otherwise.
What I get from the OP's question is that the company owns anything he creates, independently of it being done on work time.
Just don't do it on company dime and company time. This is what weekends are for, and it'd be up to the company to prove otherwise.