node: fix typo and optimize `useColors()` logic