BetterColorChange

Update main.js

In general, the lightening/darkening algorithm in BTTV does change the hue of a color, particularly when one of the RGB components is FF, another is 00, and the third is neither (for example, a deep purple, with small nonzero R, G=0, and B=FF, will be hue-shifted toward magenta); this changed algorithm converts to HSL, performs lightening or darkening *only* on colors that are too dark (or light, respectively), and converts back to RGB.

Based on my observations, I suspect that "too dark" for DarkenTTV is below 64% luminosity, and "too light" for the default theme is above 36% luminosity.

Update main.js

Sorry, I misunderstood the meaning of "background === 'light'" as whether DarkenTTV was off; now I know it means that the color would *look best* on a light background.

I changed the lightening algorithm again, to something closer to what was originally intended; for colors to be lightened, instead of lightening by 20%, I inverted luminosity, darkened by 80%, then inverted again, so even black and blue would become light enough.

Update main.js

removed now-unused variables c, i, and inputColor from function calculateColorReplacement()

Built betterttv.js and package.json with gulp

I somehow thought gulp was a post-commit verification step, not a
pre-commit build step.

Drop 'use strict' directives in helper functions

I see that the build process adds them at the top of the IIFE, so
they're not needed in the inner functions; also my local text editor
strips whitespace from the ends of lines, hence all of the changed
lines.