private function paletteToHex($palette): array
    {
        $r = [];
        foreach ($palette as $paletteColor) {
            $r[] = self::rgb2hex($paletteColor);
        }

        return $r;
    }
private function paletteToHex($palette): array
    {
        $r = [];
        foreach ($palette as $paletteColor) {
            $r[] = self::rgb2hex($paletteColor);
        }

        return $r;
    }
private function paletteToHex ( $ palette ) : array { $ r = [ ] ; foreach ( $ palette as $ paletteColor ) { $ r [ ] = self :: rgb2hex ( $ paletteColor ) ; } return $ r ; }
Convert palette to array of hex colors

@param array $palette

@return array
Convert palette to array of hex colors