private function getRandomColorCode()
    {
        do {
            $colorCode = rand(0, 255);
        } while (in_array($colorCode, $this->usedColorCodes));

        // Add the color to the used color code.
        $this->usedColorCodes[] = $colorCode;

        return $colorCode;
    }