public static function materialAvatar(string $name, float $dimensions = 100, string $color = null) : string
    {
        $letter = mb_substr($name, 0, 1, 'utf-8');

        if (!$color) {
            $color = static::materialColors()->random();
        } else {
            $color = static::materialColors($color);
        }

        $text_position = bcdiv($dimensions, 2, 2);
        $cache_key = "support__material_avatar:{$letter}_{$dimensions}_{$color}";

        if (!Cache::has($cache_key)) {
            $image = Image::canvas($dimensions, $dimensions, $color)
                ->text($letter, $text_position, $text_position, function ($font) use ($dimensions) {
                    $font->file(__DIR__ . '/../Assets/fonts/Roboto-Light.ttf')
                        ->size(bcdiv($dimensions, 1.75, 2))
                        ->color('#ffffff')
                        ->align('center')
                        ->valign('middle');
                })
                ->encode('data-url');
            Cache::put($cache_key, $image);
            return $image;
        }

        return Cache::get($cache_key);
    }