Convert code to TypeScript, add color library.