{"id":1181337,"date":"2025-01-15T18:49:52","date_gmt":"2025-01-15T10:49:52","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1181337.html"},"modified":"2025-01-15T18:49:56","modified_gmt":"2025-01-15T10:49:56","slug":"%e5%a6%82%e4%bd%95%e5%9c%a8python%e4%b8%ad%e8%8e%b7%e5%8f%96%e9%a2%9c%e8%89%b2-2","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1181337.html","title":{"rendered":"\u5982\u4f55\u5728python\u4e2d\u83b7\u53d6\u989c\u8272"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25125724\/eb188b31-d57c-4def-ad73-7bd5be3089b1.webp\" alt=\"\u5982\u4f55\u5728python\u4e2d\u83b7\u53d6\u989c\u8272\" \/><\/p>\n<p><p> \u5728Python\u4e2d\u83b7\u53d6\u989c\u8272\u7684\u65b9\u6cd5\u6709\u5f88\u591a\u79cd\uff0c<strong>\u53ef\u4ee5\u4f7f\u7528\u6807\u51c6\u5e93\u4e2d\u7684\u989c\u8272\u7f16\u7801\u3001\u5229\u7528\u7b2c\u4e09\u65b9\u5e93\u5982<code>matplotlib<\/code>\u3001<code>Pillow<\/code>\u3001<code>webcolors<\/code>\u7b49\u83b7\u53d6\u989c\u8272\u3001\u4ece\u56fe\u7247\u4e2d\u63d0\u53d6\u989c\u8272<\/strong>\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5176\u4e2d\u7684\u4e00\u79cd\u65b9\u6cd5\uff0c\u5373\u4f7f\u7528<code>webcolors<\/code>\u5e93\u83b7\u53d6\u989c\u8272\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528\u6807\u51c6\u5e93\u4e2d\u7684\u989c\u8272\u7f16\u7801<\/h3>\n<\/p>\n<p><p>Python\u6807\u51c6\u5e93\u4e2d\u5e76\u6ca1\u6709\u4e13\u95e8\u7684\u989c\u8272\u5e93\uff0c\u4f46\u662f\u53ef\u4ee5\u901a\u8fc7\u4e00\u4e9b\u57fa\u672c\u7684\u65b9\u5f0f\u6765\u83b7\u53d6\u989c\u8272\u3002\u4f8b\u5982\uff0c\u901a\u8fc7RGB\u503c\u3001\u5341\u516d\u8fdb\u5236\u3001\u6216\u989c\u8272\u540d\u79f0\u6765\u8868\u793a\u989c\u8272\u3002\u5728\u8fd9\u65b9\u9762\uff0c\u4f7f\u7528\u6807\u51c6\u5e93\u7684\u4f18\u52bf\u5728\u4e8e\u4e0d\u9700\u8981\u989d\u5916\u5b89\u88c5\u4efb\u4f55\u5e93\u3002<\/p>\n<\/p>\n<p><h4>1\u3001RGB\u4e0e\u5341\u516d\u8fdb\u5236\u4e92\u8f6c<\/h4>\n<\/p>\n<p><p>RGB\uff08\u7ea2\u3001\u7eff\u3001\u84dd\uff09\u662f\u4e00\u79cd\u5e38\u89c1\u7684\u989c\u8272\u8868\u793a\u65b9\u6cd5\u3002RGB\u503c\u53ef\u4ee5\u8f6c\u6362\u4e3a\u5341\u516d\u8fdb\u5236\u8868\u793a\uff0c\u53cd\u4e4b\u4ea6\u7136\u3002\u4ee5\u4e0b\u662f\u8f6c\u6362\u7684\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def rgb_to_hex(rgb):<\/p>\n<p>    return &#39;#%02x%02x%02x&#39; % rgb<\/p>\n<p>def hex_to_rgb(hex_color):<\/p>\n<p>    hex_color = hex_color.lstrip(&#39;#&#39;)<\/p>\n<p>    return tuple(int(hex_color[i:i+2], 16) for i in (0, 2, 4))<\/p>\n<h2><strong>\u793a\u4f8b<\/strong><\/h2>\n<p>rgb_color = (255, 0, 0)<\/p>\n<p>hex_color = rgb_to_hex(rgb_color)<\/p>\n<p>print(f&quot;RGB {rgb_color} \u8f6c\u6362\u4e3a\u5341\u516d\u8fdb\u5236 {hex_color}&quot;)<\/p>\n<p>hex_color = &quot;#ff0000&quot;<\/p>\n<p>rgb_color = hex_to_rgb(hex_color)<\/p>\n<p>print(f&quot;\u5341\u516d\u8fdb\u5236 {hex_color} \u8f6c\u6362\u4e3aRGB {rgb_color}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u6807\u51c6\u989c\u8272\u540d\u79f0\u4e0eRGB\u503c<\/h4>\n<\/p>\n<p><p>\u867d\u7136\u6807\u51c6\u5e93\u4e2d\u6ca1\u6709\u76f4\u63a5\u63d0\u4f9b\u540d\u79f0\u5230RGB\u503c\u7684\u6620\u5c04\uff0c\u4f46\u53ef\u4ee5\u901a\u8fc7\u5b9a\u4e49\u4e00\u4e2a\u5b57\u5178\u6765\u5b9e\u73b0\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">colors = {<\/p>\n<p>    &quot;red&quot;: (255, 0, 0),<\/p>\n<p>    &quot;green&quot;: (0, 255, 0),<\/p>\n<p>    &quot;blue&quot;: (0, 0, 255),<\/p>\n<p>    &quot;white&quot;: (255, 255, 255),<\/p>\n<p>    &quot;black&quot;: (0, 0, 0)<\/p>\n<p>}<\/p>\n<h2><strong>\u793a\u4f8b<\/strong><\/h2>\n<p>color_name = &quot;red&quot;<\/p>\n<p>rgb_value = colors.get(color_name, &quot;\u672a\u77e5\u989c\u8272&quot;)<\/p>\n<p>print(f&quot;\u989c\u8272 {color_name} \u7684RGB\u503c\u662f {rgb_value}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528<code>webcolors<\/code>\u5e93\u83b7\u53d6\u989c\u8272<\/h3>\n<\/p>\n<p><p><code>webcolors<\/code>\u5e93\u662f\u4e00\u4e2a\u4e13\u95e8\u7528\u4e8e\u5904\u7406\u989c\u8272\u7684\u7b2c\u4e09\u65b9\u5e93\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u8fdb\u884c\u989c\u8272\u540d\u79f0\u4e0eRGB\u503c\u4e4b\u95f4\u7684\u8f6c\u6362\u3002\u4f7f\u7528<code>webcolors<\/code>\u5e93\u53ef\u4ee5\u4f7f\u4ee3\u7801\u66f4\u52a0\u7b80\u6d01\u548c\u6613\u8bfb\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u5b89\u88c5<code>webcolors<\/code>\u5e93<\/h4>\n<\/p>\n<p><p>\u9996\u5148\u9700\u8981\u5b89\u88c5<code>webcolors<\/code>\u5e93\uff0c\u53ef\u4ee5\u4f7f\u7528pip\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-sh\">pip install webcolors<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u4f7f\u7528<code>webcolors<\/code>\u5e93\u8fdb\u884c\u989c\u8272\u8f6c\u6362<\/h4>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528<code>webcolors<\/code>\u5e93\u4e2d\u7684\u51fd\u6570\u8fdb\u884c\u989c\u8272\u540d\u79f0\u4e0eRGB\u503c\u4e4b\u95f4\u7684\u8f6c\u6362\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import webcolors<\/p>\n<h2><strong>\u989c\u8272\u540d\u79f0\u8f6c\u6362\u4e3aRGB\u503c<\/strong><\/h2>\n<p>def color_name_to_rgb(color_name):<\/p>\n<p>    try:<\/p>\n<p>        return webcolors.name_to_rgb(color_name)<\/p>\n<p>    except ValueError:<\/p>\n<p>        return &quot;\u672a\u77e5\u989c\u8272&quot;<\/p>\n<h2><strong>RGB\u503c\u8f6c\u6362\u4e3a\u989c\u8272\u540d\u79f0<\/strong><\/h2>\n<p>def rgb_to_color_name(rgb):<\/p>\n<p>    try:<\/p>\n<p>        return webcolors.rgb_to_name(rgb)<\/p>\n<p>    except ValueError:<\/p>\n<p>        return &quot;\u672a\u77e5\u989c\u8272&quot;<\/p>\n<h2><strong>\u793a\u4f8b<\/strong><\/h2>\n<p>color_name = &quot;red&quot;<\/p>\n<p>rgb_value = color_name_to_rgb(color_name)<\/p>\n<p>print(f&quot;\u989c\u8272 {color_name} \u7684RGB\u503c\u662f {rgb_value}&quot;)<\/p>\n<p>rgb_value = (255, 0, 0)<\/p>\n<p>color_name = rgb_to_color_name(rgb_value)<\/p>\n<p>print(f&quot;RGB\u503c {rgb_value} \u5bf9\u5e94\u7684\u989c\u8272\u540d\u79f0\u662f {color_name}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u4f7f\u7528<code>Pillow<\/code>\u5e93\u4ece\u56fe\u7247\u4e2d\u63d0\u53d6\u989c\u8272<\/h3>\n<\/p>\n<p><p><code>Pillow<\/code>\uff08PIL\uff09\u662f\u4e00\u4e2a\u5f3a\u5927\u7684\u56fe\u50cf\u5904\u7406\u5e93\uff0c\u53ef\u4ee5\u7528\u6765\u4ece\u56fe\u7247\u4e2d\u63d0\u53d6\u989c\u8272\u4fe1\u606f\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u5b89\u88c5<code>Pillow<\/code>\u5e93<\/h4>\n<\/p>\n<p><p>\u9996\u5148\u9700\u8981\u5b89\u88c5<code>Pillow<\/code>\u5e93\uff0c\u53ef\u4ee5\u4f7f\u7528pip\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-sh\">pip install Pillow<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u4ece\u56fe\u7247\u4e2d\u63d0\u53d6\u989c\u8272<\/h4>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528<code>Pillow<\/code>\u5e93\u52a0\u8f7d\u56fe\u7247\u5e76\u63d0\u53d6\u989c\u8272\u4fe1\u606f\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\u4ee3\u7801\uff0c\u7528\u6765\u63d0\u53d6\u56fe\u7247\u4e2d\u6700\u5e38\u89c1\u7684\u989c\u8272\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from PIL import Image<\/p>\n<p>from collections import Counter<\/p>\n<p>def get_dominant_color(image_path):<\/p>\n<p>    image = Image.open(image_path)<\/p>\n<p>    image = image.resize((100, 100))  # \u8c03\u6574\u56fe\u7247\u5927\u5c0f\u4ee5\u52a0\u5feb\u5904\u7406\u901f\u5ea6<\/p>\n<p>    pixels = list(image.getdata())<\/p>\n<p>    pixel_count = Counter(pixels)<\/p>\n<p>    dominant_color = pixel_count.most_common(1)[0][0]<\/p>\n<p>    return dominant_color<\/p>\n<h2><strong>\u793a\u4f8b<\/strong><\/h2>\n<p>image_path = &quot;example.jpg&quot;  # \u66ff\u6362\u4e3a\u5b9e\u9645\u56fe\u7247\u8def\u5f84<\/p>\n<p>dominant_color = get_dominant_color(image_path)<\/p>\n<p>print(f&quot;\u56fe\u7247\u4e2d\u6700\u5e38\u89c1\u7684\u989c\u8272\u662f {dominant_color}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u4f7f\u7528<code>matplotlib<\/code>\u5e93\u663e\u793a\u989c\u8272<\/h3>\n<\/p>\n<p><p><code>matplotlib<\/code>\u662f\u4e00\u4e2a\u6d41\u884c\u7684\u6570\u636e\u53ef\u89c6\u5316\u5e93\uff0c\u53ef\u4ee5\u7528\u6765\u663e\u793a\u989c\u8272\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u5b89\u88c5<code>matplotlib<\/code>\u5e93<\/h4>\n<\/p>\n<p><p>\u9996\u5148\u9700\u8981\u5b89\u88c5<code>matplotlib<\/code>\u5e93\uff0c\u53ef\u4ee5\u4f7f\u7528pip\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-sh\">pip install matplotlib<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u663e\u793a\u989c\u8272<\/h4>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528<code>matplotlib<\/code>\u5e93\u663e\u793a\u989c\u8272\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\u4ee3\u7801\uff0c\u663e\u793a\u4e00\u7ec4\u989c\u8272\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import matplotlib.pyplot as plt<\/p>\n<p>def show_colors(colors):<\/p>\n<p>    fig, ax = plt.subplots(1, len(colors), figsize=(len(colors) * 2, 2))<\/p>\n<p>    for i, color in enumerate(colors):<\/p>\n<p>        ax[i].imshow([[color]])<\/p>\n<p>        ax[i].axis(&#39;off&#39;)<\/p>\n<p>    plt.show()<\/p>\n<h2><strong>\u793a\u4f8b<\/strong><\/h2>\n<p>colors = [(255, 0, 0), (0, 255, 0), (0, 0, 255)]<\/p>\n<p>show_colors(colors)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u5728Python\u4e2d\u83b7\u53d6\u989c\u8272\u7684\u65b9\u6cd5\u591a\u79cd\u591a\u6837\uff0c\u53ef\u4ee5\u6839\u636e\u5b9e\u9645\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u3002<strong>\u53ef\u4ee5\u4f7f\u7528\u6807\u51c6\u5e93\u4e2d\u7684\u989c\u8272\u7f16\u7801\u3001\u5229\u7528\u7b2c\u4e09\u65b9\u5e93\u5982<code>matplotlib<\/code>\u3001<code>Pillow<\/code>\u3001<code>webcolors<\/code>\u7b49\u83b7\u53d6\u989c\u8272\u3001\u4ece\u56fe\u7247\u4e2d\u63d0\u53d6\u989c\u8272<\/strong>\u3002\u5176\u4e2d\uff0c<code>webcolors<\/code>\u5e93\u63d0\u4f9b\u4e86\u65b9\u4fbf\u7684\u989c\u8272\u540d\u79f0\u4e0eRGB\u503c\u4e4b\u95f4\u7684\u8f6c\u6362\u529f\u80fd\uff0c\u800c<code>Pillow<\/code>\u5e93\u5219\u53ef\u4ee5\u7528\u4e8e\u4ece\u56fe\u7247\u4e2d\u63d0\u53d6\u989c\u8272\u4fe1\u606f\u3002<code>matplotlib<\/code>\u5e93\u5219\u53ef\u4ee5\u7528\u4e8e\u663e\u793a\u989c\u8272\u3002\u901a\u8fc7\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u53ef\u4ee5\u7075\u6d3b\u5730\u5904\u7406\u5404\u79cd\u4e0e\u989c\u8272\u76f8\u5173\u7684\u9700\u6c42\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5728Python\u4e2d\u5982\u4f55\u83b7\u53d6\u7279\u5b9a\u989c\u8272\u7684RGB\u503c\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528PIL\uff08Python Imaging Library\uff09\u6216\u5176\u5206\u652fPillow\u5e93\u6765\u83b7\u53d6\u7279\u5b9a\u989c\u8272\u7684RGB\u503c\u3002\u901a\u8fc7\u521b\u5efa\u4e00\u4e2a\u989c\u8272\u56fe\u50cf\u6216\u76f4\u63a5\u6307\u5b9a\u989c\u8272\uff0c\u53ef\u4ee5\u83b7\u53d6\u5176RGB\u503c\u3002\u4f8b\u5982\uff0c\u4f7f\u7528<code>Image.new()<\/code>\u65b9\u6cd5\u521b\u5efa\u989c\u8272\u56fe\u50cf\uff0c\u5e76\u901a\u8fc7<code>getpixel()<\/code>\u65b9\u6cd5\u83b7\u53d6\u7279\u5b9a\u4f4d\u7f6e\u7684\u50cf\u7d20RGB\u503c\u3002<\/p>\n<p><strong>Python\u4e2d\u5982\u4f55\u4f7f\u7528OpenCV\u83b7\u53d6\u989c\u8272\u4fe1\u606f\uff1f<\/strong><br \/>OpenCV\u662f\u4e00\u4e2a\u5f3a\u5927\u7684\u8ba1\u7b97\u673a\u89c6\u89c9\u5e93\uff0c\u80fd\u591f\u5728\u56fe\u50cf\u5904\u7406\u4e2d\u83b7\u53d6\u989c\u8272\u4fe1\u606f\u3002\u4f7f\u7528<code>cv2.imread()<\/code>\u52a0\u8f7d\u56fe\u50cf\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u6307\u5b9a\u7684\u50cf\u7d20\u4f4d\u7f6e\u6765\u8bbf\u95ee\u5176\u989c\u8272\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u901a\u8fc7<code>image[y, x]<\/code>\u7684\u65b9\u5f0f\u83b7\u53d6\u7279\u5b9a\u50cf\u7d20\u7684BGR\u989c\u8272\u503c\uff0c\u5e76\u6839\u636e\u9700\u8981\u8f6c\u6362\u4e3a\u5176\u4ed6\u989c\u8272\u7a7a\u95f4\uff08\u5982RGB\uff09\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728Python\u4e2d\u5b9a\u4e49\u548c\u4f7f\u7528\u989c\u8272\u5e38\u91cf\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u5b9a\u4e49\u4e00\u4e2a\u5b57\u5178\u6216\u4f7f\u7528\u7c7b\u6765\u7ba1\u7406\u989c\u8272\u5e38\u91cf\u3002\u8fd9\u79cd\u65b9\u6cd5\u53ef\u4ee5\u5c06\u989c\u8272\u4e0e\u540d\u79f0\u5173\u8054\u8d77\u6765\uff0c\u65b9\u4fbf\u5728\u4ee3\u7801\u4e2d\u8c03\u7528\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2a\u5b57\u5178<code>colors = {&#39;red&#39;: (255, 0, 0), &#39;green&#39;: (0, 255, 0)}<\/code>\uff0c\u7136\u540e\u901a\u8fc7<code>colors[&#39;red&#39;]<\/code>\u83b7\u53d6\u7ea2\u8272\u7684RGB\u503c\u3002\u8fd9\u6837\u7684\u65b9\u5f0f\u4f7f\u4ee3\u7801\u66f4\u5177\u53ef\u8bfb\u6027\u4e0e\u7ef4\u62a4\u6027\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\u83b7\u53d6\u989c\u8272\u7684\u65b9\u6cd5\u6709\u5f88\u591a\u79cd\uff0c\u53ef\u4ee5\u4f7f\u7528\u6807\u51c6\u5e93\u4e2d\u7684\u989c\u8272\u7f16\u7801\u3001\u5229\u7528\u7b2c\u4e09\u65b9\u5e93\u5982matplotlib\u3001Pil [&hellip;]","protected":false},"author":3,"featured_media":1181342,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1181337"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1181337"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1181337\/revisions"}],"predecessor-version":[{"id":1181343,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1181337\/revisions\/1181343"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1181342"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1181337"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1181337"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1181337"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}