Solved by KFrank in post #2 
              
              
                Hi Zimo! 

Instead of applying sigmoid() to all of your neurons and then applying 
logit() to your color neurons to undo the sigmoid(), apply sigmoid() 
only to your non-color neurons so that the color neurons never get 
transformed. 
(Applying sigmoid() to a large-enough (non-inf) value will map it …