Refactor $TERM / $SOLARIZED calculation