testColorDarken() {
    // Define some RGB colors
    const black = [0, 0, 0];
    const green = [0, 255, 0];
    const darkGray = [68, 68, 68];
    const olive = [128, 128, 0];
    const purple = [128, 0, 128];
    const white = [255, 255, 255];

    // Darken black by an arbitrary factor, which should still return black.
    const darkBlack = googColor.darken(black, .63);
    assertTrue(
        'black darkened by .63 is still black.',
        rgbColorsAreEqual(black, darkBlack));

    // Call darken() with edge-case factors (0 and 1).
    const greenNotDarkened = googColor.darken(green, 0);
    assertTrue(
        'green darkened by 0 is still green.',
        rgbColorsAreEqual(green, greenNotDarkened));
    const whiteFullyDarkened = googColor.darken(white, 1);
    assertTrue(
        'white darkened by 1 is black.',
        rgbColorsAreEqual(black, whiteFullyDarkened));

    // Call darken() with various colors and factors. The result should be
    // a color with less luminance.
    const whiteHsl = googColor.rgbToHsl(white[0], white[1], white[2]);
    const whiteDarkened = googColor.darken(white, .43);
    const whiteDarkenedHsl = googColor.rgbToHsl(
        whiteDarkened[0], whiteDarkened[1], whiteDarkened[2]);
    assertTrue(
        'White that\'s darkened has less luminance than white.',
        whiteDarkenedHsl[2] < whiteHsl[2]);
    const purpleHsl = googColor.rgbToHsl(purple[0], purple[1], purple[2]);
    const purpleDarkened = googColor.darken(purple, .1);
    const purpleDarkenedHsl = googColor.rgbToHsl(
        purpleDarkened[0], purpleDarkened[1], purpleDarkened[2]);
    assertTrue(
        'Purple that\'s darkened has less luminance than purple.',
        purpleDarkenedHsl[2] < purpleHsl[2]);

    // Call darken() with factors outside the expected range.
    const darkGrayTurnedBlack = googColor.darken(darkGray, 2.1);
    assertTrue(
        'Darkening dark gray by 2.1 returns black.',
        rgbColorsAreEqual(black, darkGrayTurnedBlack));
    const whiteNotDarkened = googColor.darken(white, -0.62);
    assertTrue(
        'Darkening white by -0.62 returns white.',
        rgbColorsAreEqual(white, whiteNotDarkened));
  }
This method runs unit tests against googColor.darken(). Test cases
include darkening black with arbitrary factors, edge cases (using 0 and 1),
darkening colors using various factors, and darkening colors using factors
outside the expected range.