{"action":"created","comment":{"url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/comments/32891748","id":32891748,"diff_hunk":"@@ -0,0 +1,525 @@\n+module std.experimental.color.rgb;\n+\n+import std.experimental.color;\n+import std.experimental.color.conv: convertColor;\n+\n+import std.traits: isInstanceOf, isNumeric, isIntegral, isFloatingPoint, isSigned, isSomeChar, Unqual;\n+import std.typetuple: TypeTuple;\n+import std.typecons: tuple;\n+\n+@safe: pure: nothrow: @nogc:\n+\n+\n+enum isRGB(T) = isInstanceOf!(RGB, T);\n+\n+\n+// DEBATE: which should it be?\n+template defaultAlpha(T)\n+{\n+/+\n+    enum defaultAlpha = isFloatingPoint!T ? T(1) : T.max;\n++/\n+    enum defaultAlpha = T(0);\n+}\n+\n+\n+enum RGBColorSpace\n+{\n+    sRGB,\n+    sRGB_Gamma2_2,\n+\n+/+ TODO: these all need testing\n+    AdobeRGB,\n+    AppleRGB,\n+    BestRGB,\n+    BetaRGB,\n+    BruceRGB,\n+    CIE_RGB,\n+    ColorMatchRGB,\n+    DonRGB4,\n+//    ECI_RGB_v2,\n+    EktaSpacePS5,\n+    NTSC_RGB,\n+    PAL_SECAM_RGB,\n+    ProPhotoRGB,\n+    SMPTE_C_RGB,\n+    WideGamutRGB\n++/\n+\n+    // custom color space will disable automatic color spoace conversions\n+    Custom = -1\n+}\n+\n+\n+struct RGB(string components_, ComponentType_, bool linear_ = false, RGBColorSpace colorSpace_ = RGBColorSpace.sRGB) if(isValidComponentType!ComponentType_)\n+{\n+@safe: pure: nothrow: @nogc:\n+\n+    // RGB colors may only contain components 'rgb', or 'l' (luminance)\n+    // They may also optionally contain an 'a' (alpha) component, and 'x' (unused) components\n+    static assert(allIn!(\"rgblax\", components), \"Invalid Color component '\"d ~ notIn!(\"rgblax\", components) ~ \"'. RGB colors may only contain components: r, g, b, l, a, x\"d);\n+    static assert(anyIn!(\"rgbal\", components), \"RGB colors must contain at least one component of r, g, b, l, a.\");\n+    static assert(!canFind!(components, 'l') || !anyIn!(\"rgb\", components), \"RGB colors may not contain rgb AND luminance components together.\");\n+\n+    // create members for some useful information\n+    alias ComponentType = ComponentType_;\n+    enum string components = components_;\n+    enum RGBColorSpace colorSpace = colorSpace_;\n+    enum bool linear = linear_;\n+\n+\n+    // mixin will emit members for components\n+    template Components(string components)\n+    {\n+        static if(components.length == 0)\n+            enum Components = \"\";\n+        else\n+            enum Components = ComponentType.stringof ~ ' ' ~ components[0] ~ \" = 0;\\n\" ~ Components!(components[1..$]);\n+    }\n+    mixin(Components!components);\n+\n+    enum bool hasComponent(char c) = mixin(\"is(typeof(this.\"~c~\"))\");\n+    enum bool hasAlpha = hasComponent!'a';\n+\n+\n+    // functions that return the color channels as a tuple\n+    @property auto tristimulus() const\n+    {\n+        static if(hasComponent!'l')\n+        {\n+            return tuple(l, l, l);\n+        }\n+        else\n+        {\n+            static if(!hasComponent!'r')\n+                enum r = ComponentType(0);\n+            static if(!hasComponent!'g')\n+                enum g = ComponentType(0);\n+            static if(!hasComponent!'b')\n+                enum b = ComponentType(0);\n+            return tuple(r, g, b);\n+        }\n+    }\n+    @property auto tristimulusWithAlpha() const\n+    {\n+        static if(!hasAlpha)\n+            enum a = defaultAlpha!ComponentType;\n+        return tuple(tristimulus.expand, a);\n+    }\n+\n+    // RGB/A initialiser\n+    this(ComponentType r, ComponentType g, ComponentType b, ComponentType a = defaultAlpha!ComponentType)\n+    {\n+        foreach(c; TypeTuple!('r','g','b','a'))\n+            mixin(ComponentExpression!(\"this._ = _;\", c, null));\n+        static if(canFind!(components, 'l'))\n+            this.l = toGrayscale!colorSpace(r, g, b); // ** Contentious? I this this is most useful\n+    }\n+\n+    // L/A initialiser\n+    this(ComponentType l, ComponentType a = defaultAlpha!ComponentType)\n+    {\n+        foreach(c; TypeTuple!('l','r','g','b'))\n+            mixin(ComponentExpression!(\"this._ = l;\", c, null));\n+        static if(canFind!(components, 'a'))\n+            this.a = a;\n+    }\n+\n+    // hex string initialiser\n+    this(C)(const(C)[] hex) if(isSomeChar!C)\n+    {\n+        import std.experimental.color.conv: colorFromString;\n+        this = colorFromString!(typeof(this))(hex);\n+    }\n+\n+    // casts\n+    Color opCast(Color)() const if(isColor!Color)\n+    {\n+        return convertColor!Color(this);\n+    }\n+\n+    // comparison\n+    bool opEquals(typeof(this) rh) const\n+    {\n+        // this is required to exclude 'x' components from equality comparisons\n+        return tristimulusWithAlpha == rh.tristimulusWithAlpha;\n+    }\n+\n+    // operators\n+    typeof(this) opUnary(string op)() const if(op == \"+\" || op == \"-\" || (op == \"~\" && isIntegral!ComponentType))\n+    {\n+        Unqual!(typeof(this)) res = this;\n+        foreach(c; AllComponents)\n+            mixin(ComponentExpression!(\"res._ = #_;\", c, op));\n+        return res;\n+    }\n+    typeof(this) opBinary(string op)(typeof(this) rh) const if(op == \"+\" || op == \"-\" || op == \"*\" || op == \"/\")\n+    {\n+        Unqual!(typeof(this)) res = this;\n+        foreach(c; AllComponents)\n+            mixin(ComponentExpression!(\"res._ #= rh._;\", c, op));\n+        return res;\n+    }\n+    typeof(this) opBinary(string op, S)(S rh) const if(isNumeric!S && (op == \"*\" || op == \"/\" || op == \"^^\"))\n+    {\n+        Unqual!(typeof(this)) res = this;\n+        foreach(c; AllComponents)\n+            mixin(ComponentExpression!(\"res._ #= rh;\", c, op));\n+        return res;\n+    }\n+    ref typeof(this) opOpAssign(string op)(typeof(this) rh) if(op == \"+\" || op == \"-\" || op == \"*\" || op == \"/\")\n+    {\n+        foreach(c; AllComponents)\n+            mixin(ComponentExpression!(\"_ #= rh._;\", c, op));\n+        return this;\n+    }\n+    ref typeof(this) opOpAssign(string op, S)(S rh) if(isNumeric!S && (op == \"*\" || op == \"/\" || op == \"^^\"))\n+    {\n+        foreach(c; AllComponents)\n+            mixin(ComponentExpression!(\"_ #= rh;\", c, op));\n+        return this;\n+    }\n+\n+    unittest\n+    {\n+        alias UnsignedRGB = RGB!(\"rgb\", ubyte);\n+        alias SignedRGBX = RGB!(\"rgbx\", byte);\n+        alias FloatRGBA = RGB!(\"rgba\", float);\n+\n+        // test construction\n+        static assert(UnsignedRGB(\"0x908000FF\")  == UnsignedRGB(0x80,0,0xFF));\n+        static assert(FloatRGBA(\"0x908000FF\")    == FloatRGBA(float(0x80)/float(0xFF),0,1,float(0x90)/float(0xFF)));\n+\n+        // test operators\n+        static assert(-SignedRGBX(1,2,3) == SignedRGBX(-1,-2,-3));\n+        static assert(-FloatRGBA(1,2,3)  == FloatRGBA(-1,-2,-3));\n+\n+        static assert(UnsignedRGB(10,20,30)  + UnsignedRGB(4,5,6) == UnsignedRGB(14,25,36));\n+        static assert(SignedRGBX(10,20,30)   + SignedRGBX(4,5,6)  == SignedRGBX(14,25,36));\n+        static assert(FloatRGBA(10,20,30,40) + FloatRGBA(4,5,6,7) == FloatRGBA(14,25,36,47));\n+\n+        static assert(UnsignedRGB(10,20,30)  - UnsignedRGB(4,5,6) == UnsignedRGB(6,15,24));\n+        static assert(SignedRGBX(10,20,30)   - SignedRGBX(4,5,6)  == SignedRGBX(6,15,24));\n+        static assert(FloatRGBA(10,20,30,40) - FloatRGBA(4,5,6,7) == FloatRGBA(6,15,24,33));\n+\n+        static assert(UnsignedRGB(10,20,30)  * UnsignedRGB(0,1,2) == UnsignedRGB(0,20,60));\n+        static assert(SignedRGBX(10,20,30)   * SignedRGBX(0,1,2)  == SignedRGBX(0,20,60));\n+        static assert(FloatRGBA(10,20,30,40) * FloatRGBA(0,1,2,3) == FloatRGBA(0,20,60,120));\n+\n+        static assert(UnsignedRGB(10,20,30)  / UnsignedRGB(1,2,3) == UnsignedRGB(10,10,10));\n+        static assert(SignedRGBX(10,20,30)   / SignedRGBX(1,2,3)  == SignedRGBX(10,10,10));\n+        static assert(FloatRGBA(2,4,8,16)    / FloatRGBA(1,2,4,8) == FloatRGBA(2,2,2,2));\n+\n+        static assert(UnsignedRGB(10,20,30)  * 2 == UnsignedRGB(20,40,60));\n+        static assert(SignedRGBX(10,20,30)   * 2 == SignedRGBX(20,40,60));\n+        static assert(FloatRGBA(10,20,30,40) * 2 == FloatRGBA(20,40,60,80));\n+\n+        static assert(UnsignedRGB(10,20,30)  / 2 == UnsignedRGB(5,10,15));\n+        static assert(SignedRGBX(10,20,30)   / 2 == SignedRGBX(5,10,15));\n+        static assert(FloatRGBA(10,20,30,40) / 2 == FloatRGBA(5,10,15,20));\n+    }\n+\n+private:\n+    alias AllComponents = TypeTuple!('l','r','g','b','a');\n+    alias ParentColourSpace = XYZ!(FloatTypeFor!ComponentType);\n+}\n+\n+\n+// TODO: represent packed colors, eg R5G6B5, etc\n+struct PackedRGB(string format, bool linear_ = false, RGBColorSpace colorSpace_ = RGBColorSpace.sRGB)\n+{\n+@safe: pure: nothrow: @nogc:\n+\n+    // RGB colors may only contain components 'rgb', or 'l' (luminance)\n+    // They may also optionally contain an 'a' (alpha) component, and 'x' (unused) components\n+    static assert(allIn!(\"rgblax\", components), \"Invalid Color component '\"d ~ notIn!(\"rgblax\", components) ~ \"'. RGB colors may only contain components: r, g, b, l, a, x\"d);\n+    static assert(anyIn!(\"rgbal\", components), \"RGB colors must contain at least one component of r, g, b, l, a.\");\n+    static assert(!canFind!(components, 'l') || !anyIn!(\"rgb\", components), \"RGB colors may not contain rgb AND luminance components together.\");\n+\n+    // create members for some useful information\n+    alias UnpackedComponentType = ubyte; // RGBA1010102 should be ushort, etc\n+    enum string components = format; // TODO: strip sizes from format ('rgb565' => 'rgb')\n+    enum RGBColorSpace colorSpace = colorSpace_;\n+    enum bool linear = linear_;\n+\n+    // TODO: we'll try and fabricate the packing algorithm based on the format string\n+    //...\n+\n+    void pack(C)(C color);\n+    C unpack(C)();\n+\n+private:\n+    alias ParentColourSpace = RGB!(components, UnpackedComponentType, linear_, colorSpace_);\n+}\n+\n+\n+// gamma ramp conversions\n+T toLinear(RGBColorSpace src, T)(T v) if(isFloatingPoint!T)\n+{\n+    enum ColorSpace = RGBColorSpaceDefs!T[src];\n+    return ColorSpace.toLinear(v);\n+}\n+T toGamma(RGBColorSpace src, T)(T v) if(isFloatingPoint!T)\n+{\n+    enum ColorSpace = RGBColorSpaceDefs!T[src];\n+    return ColorSpace.toGamma(v);\n+}\n+\n+auto toLinear(C)(C color) const if(isRGB!C)\n+{\n+    return cast(RGB!(C.components, C.ComponentType, true, C.colorSpace))color;\n+}\n+auto toGamma(C)(C color) const if(isRGB!C)\n+{\n+    return cast(RGB!(C.components, C.ComponentType, false, C.colorSpace))color;\n+}\n+\n+\n+package:\n+//\n+// Below exists a bunch of machinery for converting between RGB colour spaces\n+//\n+\n+import std.experimental.color.xyz;\n+\n+// RGB color space definitions\n+struct RGBColorSpaceDef(F)\n+{\n+    alias GammaFunc = F function(F v) pure nothrow @nogc @safe;\n+\n+    string name;\n+\n+    GammaFunc toGamma;\n+    GammaFunc toLinear;\n+\n+    XYZ!F white;\n+    xyY!F red;\n+    xyY!F green;\n+    xyY!F blue;\n+}\n+\n+enum RGBColorSpaceDefs(F) = [\n+    RGBColorSpaceDef!F(\"sRGB\",           &linearTosRGB!F,         &sRGBToLinear!F,         WhitePoint!F.D65, xyY!F(0.6400, 0.3300, 0.212656), xyY!F(0.3000, 0.6000, 0.715158), xyY!F(0.1500, 0.0600, 0.072186)),\n+    RGBColorSpaceDef!F(\"sRGB Simple\",    &linearToGamma!(F, 2.2), &gammaToLinear!(F, 2.2), WhitePoint!F.D65, xyY!F(0.6400, 0.3300, 0.212656), xyY!F(0.3000, 0.6000, 0.715158), xyY!F(0.1500, 0.0600, 0.072186)),\n+\n+/+ TODO: these all need testing to prove they are correct\n+    // ** adobe seen using gamma 2.19921875 ???\n+    RGBColorSpaceDef!F(\"Adobe RGB\",      &linearToGamma!(F, 2.2), &gammaToLinear!(F, 2.2), WhitePoint!F.D65, xyY!F(0.6400, 0.3300, 0.297361), xyY!F(0.2100, 0.7100, 0.627355), xyY!F(0.1500, 0.0600, 0.075285)),\n+    RGBColorSpaceDef!F(\"Apple RGB\",      &linearToGamma!(F, 1.8), &gammaToLinear!(F, 1.8), WhitePoint!F.D65, xyY!F(0.6250, 0.3400, 0.244634), xyY!F(0.2800, 0.5950, 0.672034), xyY!F(0.1550, 0.0700, 0.083332)),\n+    RGBColorSpaceDef!F(\"Best RGB\",       &linearToGamma!(F, 2.2), &gammaToLinear!(F, 2.2), WhitePoint!F.D50, xyY!F(0.7347, 0.2653, 0.228457), xyY!F(0.2150, 0.7750, 0.737352), xyY!F(0.1300, 0.0350, 0.034191)),\n+    RGBColorSpaceDef!F(\"Beta RGB\",       &linearToGamma!(F, 2.2), &gammaToLinear!(F, 2.2), WhitePoint!F.D50, xyY!F(0.6888, 0.3112, 0.303273), xyY!F(0.1986, 0.7551, 0.663786), xyY!F(0.1265, 0.0352, 0.032941)),\n+    RGBColorSpaceDef!F(\"Bruce RGB\",      &linearToGamma!(F, 2.2), &gammaToLinear!(F, 2.2), WhitePoint!F.D65, xyY!F(0.6400, 0.3300, 0.240995), xyY!F(0.2800, 0.6500, 0.683554), xyY!F(0.1500, 0.0600, 0.075452)),\n+    RGBColorSpaceDef!F(\"CIE RGB\",        &linearToGamma!(F, 2.2), &gammaToLinear!(F, 2.2), WhitePoint!F.E,   xyY!F(0.7350, 0.2650, 0.176204), xyY!F(0.2740, 0.7170, 0.812985), xyY!F(0.1670, 0.0090, 0.010811)),\n+    RGBColorSpaceDef!F(\"ColorMatch RGB\", &linearToGamma!(F, 1.8), &gammaToLinear!(F, 1.8), WhitePoint!F.D50, xyY!F(0.6300, 0.3400, 0.274884), xyY!F(0.2950, 0.6050, 0.658132), xyY!F(0.1500, 0.0750, 0.066985)),\n+    RGBColorSpaceDef!F(\"Don RGB 4\",      &linearToGamma!(F, 2.2), &gammaToLinear!(F, 2.2), WhitePoint!F.D50, xyY!F(0.6960, 0.3000, 0.278350), xyY!F(0.2150, 0.7650, 0.687970), xyY!F(0.1300, 0.0350, 0.033680)),\n+//    RGBColorSpaceDef!F(\"ECI RGB v2\",     L*,                                               WhitePoint!F.D50, xyY!F(0.6700, 0.3300, 0.320250), xyY!F(0.2100, 0.7100, 0.602071), xyY!F(0.1400, 0.0800, 0.077679)),\n+    RGBColorSpaceDef!F(\"Ekta Space PS5\", &linearToGamma!(F, 2.2), &gammaToLinear!(F, 2.2), WhitePoint!F.D50, xyY!F(0.6950, 0.3050, 0.260629), xyY!F(0.2600, 0.7000, 0.734946), xyY!F(0.1100, 0.0050, 0.004425)),\n+    RGBColorSpaceDef!F(\"NTSC RGB\",       &linearToGamma!(F, 2.2), &gammaToLinear!(F, 2.2), WhitePoint!F.C,   xyY!F(0.6700, 0.3300, 0.298839), xyY!F(0.2100, 0.7100, 0.586811), xyY!F(0.1400, 0.0800, 0.114350)),\n+    RGBColorSpaceDef!F(\"PAL/SECAM RGB\",  &linearToGamma!(F, 2.2), &gammaToLinear!(F, 2.2), WhitePoint!F.D65, xyY!F(0.6400, 0.3300, 0.222021), xyY!F(0.2900, 0.6000, 0.706645), xyY!F(0.1500, 0.0600, 0.071334)),\n+    RGBColorSpaceDef!F(\"ProPhoto RGB\",   &linearToGamma!(F, 1.8), &gammaToLinear!(F, 1.8), WhitePoint!F.D50, xyY!F(0.7347, 0.2653, 0.288040), xyY!F(0.1596, 0.8404, 0.711874), xyY!F(0.0366, 0.0001, 0.000086)),\n+    RGBColorSpaceDef!F(\"SMPTE-C RGB\",    &linearToGamma!(F, 2.2), &gammaToLinear!(F, 2.2), WhitePoint!F.D65, xyY!F(0.6300, 0.3400, 0.212395), xyY!F(0.3100, 0.5950, 0.701049), xyY!F(0.1550, 0.0700, 0.086556)),\n+    RGBColorSpaceDef!F(\"Wide Gamut RGB\", &linearToGamma!(F, 2.2), &gammaToLinear!(F, 2.2), WhitePoint!F.D50, xyY!F(0.7350, 0.2650, 0.258187), xyY!F(0.1150, 0.8260, 0.724938), xyY!F(0.1570, 0.0180, 0.016875))\n++/\n+];\n+\n+template RGBColorSpaceMatrix(RGBColorSpace cs, F)\n+{\n+    enum F[3] ToXYZ(xyY!F c) = [ c.x/c.y, F(1), (F(1)-c.x-c.y)/c.y ];\n+\n+    // get the colour space definition\n+    enum def = RGBColorSpaceDefs!F[cs];\n+    // build a matrix from the 3 colour vectors\n+    enum r = def.red, g = def.green, b = def.blue;\n+    enum m = transpose([ ToXYZ!r, ToXYZ!g, ToXYZ!b ]);\n+\n+    // multiply by the whitepoint\n+    enum w = [ def.white.tupleof ];\n+    enum s = multiply(inverse(m), w);\n+\n+    // return colourspace matrix (RGB -> XYZ)\n+    enum F[3][3] RGBColorSpaceMatrix = [[ m[0][0]*s[0], m[0][1]*s[1], m[0][2]*s[2] ],\n+                                        [ m[1][0]*s[0], m[1][1]*s[1], m[1][2]*s[2] ],\n+                                        [ m[2][0]*s[0], m[2][1]*s[1], m[2][2]*s[2] ]];\n+}\n+\n+\n+package(std.experimental.color):","path":"std/experimental/color/rgb.d","position":346,"original_position":346,"commit_id":"f64bb62f838da4ac897057d85288d4354f4c7258","original_commit_id":"f64bb62f838da4ac897057d85288d4354f4c7258","user":{"login":"CyberShadow","id":160894,"avatar_url":"https://avatars.githubusercontent.com/u/160894?v=3","gravatar_id":"","url":"https://api.github.com/users/CyberShadow","html_url":"https://github.com/CyberShadow","followers_url":"https://api.github.com/users/CyberShadow/followers","following_url":"https://api.github.com/users/CyberShadow/following{/other_user}","gists_url":"https://api.github.com/users/CyberShadow/gists{/gist_id}","starred_url":"https://api.github.com/users/CyberShadow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CyberShadow/subscriptions","organizations_url":"https://api.github.com/users/CyberShadow/orgs","repos_url":"https://api.github.com/users/CyberShadow/repos","events_url":"https://api.github.com/users/CyberShadow/events{/privacy}","received_events_url":"https://api.github.com/users/CyberShadow/received_events","type":"User","site_admin":false},"body":"This is already under `package:`?","created_at":"2015-06-21T08:49:53Z","updated_at":"2015-06-21T08:49:53Z","html_url":"https://github.com/D-Programming-Language/phobos/pull/2845#discussion_r32891748","pull_request_url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/2845","_links":{"self":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/comments/32891748"},"html":{"href":"https://github.com/D-Programming-Language/phobos/pull/2845#discussion_r32891748"},"pull_request":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/2845"}}},"pull_request":{"url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/2845","id":26891491,"html_url":"https://github.com/D-Programming-Language/phobos/pull/2845","diff_url":"https://github.com/D-Programming-Language/phobos/pull/2845.diff","patch_url":"https://github.com/D-Programming-Language/phobos/pull/2845.patch","issue_url":"https://api.github.com/repos/D-Programming-Language/phobos/issues/2845","number":2845,"state":"open","locked":false,"title":"Added std.experimental.color","user":{"login":"TurkeyMan","id":1146706,"avatar_url":"https://avatars.githubusercontent.com/u/1146706?v=3","gravatar_id":"","url":"https://api.github.com/users/TurkeyMan","html_url":"https://github.com/TurkeyMan","followers_url":"https://api.github.com/users/TurkeyMan/followers","following_url":"https://api.github.com/users/TurkeyMan/following{/other_user}","gists_url":"https://api.github.com/users/TurkeyMan/gists{/gist_id}","starred_url":"https://api.github.com/users/TurkeyMan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TurkeyMan/subscriptions","organizations_url":"https://api.github.com/users/TurkeyMan/orgs","repos_url":"https://api.github.com/users/TurkeyMan/repos","events_url":"https://api.github.com/users/TurkeyMan/events{/privacy}","received_events_url":"https://api.github.com/users/TurkeyMan/received_events","type":"User","site_admin":false},"body":"There's talk about adding a std.colour type, here's a starting point for consideration.\r\nKnows about colour space and comprehensive format conversions.\r\nMore common colour spaces to come.","created_at":"2015-01-06T14:26:36Z","updated_at":"2015-06-21T08:49:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8e138d42eab8137ed038bf9573f5cf1af91c0342","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/2845/commits","review_comments_url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/2845/comments","review_comment_url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/comments{/number}","comments_url":"https://api.github.com/repos/D-Programming-Language/phobos/issues/2845/comments","statuses_url":"https://api.github.com/repos/D-Programming-Language/phobos/statuses/f64bb62f838da4ac897057d85288d4354f4c7258","head":{"label":"TurkeyMan:colour","ref":"colour","sha":"f64bb62f838da4ac897057d85288d4354f4c7258","user":{"login":"TurkeyMan","id":1146706,"avatar_url":"https://avatars.githubusercontent.com/u/1146706?v=3","gravatar_id":"","url":"https://api.github.com/users/TurkeyMan","html_url":"https://github.com/TurkeyMan","followers_url":"https://api.github.com/users/TurkeyMan/followers","following_url":"https://api.github.com/users/TurkeyMan/following{/other_user}","gists_url":"https://api.github.com/users/TurkeyMan/gists{/gist_id}","starred_url":"https://api.github.com/users/TurkeyMan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TurkeyMan/subscriptions","organizations_url":"https://api.github.com/users/TurkeyMan/orgs","repos_url":"https://api.github.com/users/TurkeyMan/repos","events_url":"https://api.github.com/users/TurkeyMan/events{/privacy}","received_events_url":"https://api.github.com/users/TurkeyMan/received_events","type":"User","site_admin":false},"repo":{"id":3272507,"name":"phobos","full_name":"TurkeyMan/phobos","owner":{"login":"TurkeyMan","id":1146706,"avatar_url":"https://avatars.githubusercontent.com/u/1146706?v=3","gravatar_id":"","url":"https://api.github.com/users/TurkeyMan","html_url":"https://github.com/TurkeyMan","followers_url":"https://api.github.com/users/TurkeyMan/followers","following_url":"https://api.github.com/users/TurkeyMan/following{/other_user}","gists_url":"https://api.github.com/users/TurkeyMan/gists{/gist_id}","starred_url":"https://api.github.com/users/TurkeyMan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TurkeyMan/subscriptions","organizations_url":"https://api.github.com/users/TurkeyMan/orgs","repos_url":"https://api.github.com/users/TurkeyMan/repos","events_url":"https://api.github.com/users/TurkeyMan/events{/privacy}","received_events_url":"https://api.github.com/users/TurkeyMan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/TurkeyMan/phobos","description":"Runtime library for the D programming language","fork":true,"url":"https://api.github.com/repos/TurkeyMan/phobos","forks_url":"https://api.github.com/repos/TurkeyMan/phobos/forks","keys_url":"https://api.github.com/repos/TurkeyMan/phobos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TurkeyMan/phobos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TurkeyMan/phobos/teams","hooks_url":"https://api.github.com/repos/TurkeyMan/phobos/hooks","issue_events_url":"https://api.github.com/repos/TurkeyMan/phobos/issues/events{/number}","events_url":"https://api.github.com/repos/TurkeyMan/phobos/events","assignees_url":"https://api.github.com/repos/TurkeyMan/phobos/assignees{/user}","branches_url":"https://api.github.com/repos/TurkeyMan/phobos/branches{/branch}","tags_url":"https://api.github.com/repos/TurkeyMan/phobos/tags","blobs_url":"https://api.github.com/repos/TurkeyMan/phobos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TurkeyMan/phobos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TurkeyMan/phobos/git/refs{/sha}","trees_url":"https://api.github.com/repos/TurkeyMan/phobos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TurkeyMan/phobos/statuses/{sha}","languages_url":"https://api.github.com/repos/TurkeyMan/phobos/languages","stargazers_url":"https://api.github.com/repos/TurkeyMan/phobos/stargazers","contributors_url":"https://api.github.com/repos/TurkeyMan/phobos/contributors","subscribers_url":"https://api.github.com/repos/TurkeyMan/phobos/subscribers","subscription_url":"https://api.github.com/repos/TurkeyMan/phobos/subscription","commits_url":"https://api.github.com/repos/TurkeyMan/phobos/commits{/sha}","git_commits_url":"https://api.github.com/repos/TurkeyMan/phobos/git/commits{/sha}","comments_url":"https://api.github.com/repos/TurkeyMan/phobos/comments{/number}","issue_comment_url":"https://api.github.com/repos/TurkeyMan/phobos/issues/comments{/number}","contents_url":"https://api.github.com/repos/TurkeyMan/phobos/contents/{+path}","compare_url":"https://api.github.com/repos/TurkeyMan/phobos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TurkeyMan/phobos/merges","archive_url":"https://api.github.com/repos/TurkeyMan/phobos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TurkeyMan/phobos/downloads","issues_url":"https://api.github.com/repos/TurkeyMan/phobos/issues{/number}","pulls_url":"https://api.github.com/repos/TurkeyMan/phobos/pulls{/number}","milestones_url":"https://api.github.com/repos/TurkeyMan/phobos/milestones{/number}","notifications_url":"https://api.github.com/repos/TurkeyMan/phobos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TurkeyMan/phobos/labels{/name}","releases_url":"https://api.github.com/repos/TurkeyMan/phobos/releases{/id}","created_at":"2012-01-26T09:23:24Z","updated_at":"2015-01-10T02:32:11Z","pushed_at":"2015-06-21T05:51:17Z","git_url":"git://github.com/TurkeyMan/phobos.git","ssh_url":"git@github.com:TurkeyMan/phobos.git","clone_url":"https://github.com/TurkeyMan/phobos.git","svn_url":"https://github.com/TurkeyMan/phobos","homepage":"d-programming-language.org","size":43239,"stargazers_count":6,"watchers_count":6,"language":"D","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":6,"default_branch":"master"}},"base":{"label":"D-Programming-Language:master","ref":"master","sha":"41d2027c22d6f8d22edd2df688c3cfd08fb20228","user":{"login":"D-Programming-Language","id":565913,"avatar_url":"https://avatars.githubusercontent.com/u/565913?v=3","gravatar_id":"","url":"https://api.github.com/users/D-Programming-Language","html_url":"https://github.com/D-Programming-Language","followers_url":"https://api.github.com/users/D-Programming-Language/followers","following_url":"https://api.github.com/users/D-Programming-Language/following{/other_user}","gists_url":"https://api.github.com/users/D-Programming-Language/gists{/gist_id}","starred_url":"https://api.github.com/users/D-Programming-Language/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/D-Programming-Language/subscriptions","organizations_url":"https://api.github.com/users/D-Programming-Language/orgs","repos_url":"https://api.github.com/users/D-Programming-Language/repos","events_url":"https://api.github.com/users/D-Programming-Language/events{/privacy}","received_events_url":"https://api.github.com/users/D-Programming-Language/received_events","type":"Organization","site_admin":false},"repo":{"id":1257084,"name":"phobos","full_name":"D-Programming-Language/phobos","owner":{"login":"D-Programming-Language","id":565913,"avatar_url":"https://avatars.githubusercontent.com/u/565913?v=3","gravatar_id":"","url":"https://api.github.com/users/D-Programming-Language","html_url":"https://github.com/D-Programming-Language","followers_url":"https://api.github.com/users/D-Programming-Language/followers","following_url":"https://api.github.com/users/D-Programming-Language/following{/other_user}","gists_url":"https://api.github.com/users/D-Programming-Language/gists{/gist_id}","starred_url":"https://api.github.com/users/D-Programming-Language/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/D-Programming-Language/subscriptions","organizations_url":"https://api.github.com/users/D-Programming-Language/orgs","repos_url":"https://api.github.com/users/D-Programming-Language/repos","events_url":"https://api.github.com/users/D-Programming-Language/events{/privacy}","received_events_url":"https://api.github.com/users/D-Programming-Language/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/D-Programming-Language/phobos","description":"The standard library of the D programming language","fork":false,"url":"https://api.github.com/repos/D-Programming-Language/phobos","forks_url":"https://api.github.com/repos/D-Programming-Language/phobos/forks","keys_url":"https://api.github.com/repos/D-Programming-Language/phobos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/D-Programming-Language/phobos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/D-Programming-Language/phobos/teams","hooks_url":"https://api.github.com/repos/D-Programming-Language/phobos/hooks","issue_events_url":"https://api.github.com/repos/D-Programming-Language/phobos/issues/events{/number}","events_url":"https://api.github.com/repos/D-Programming-Language/phobos/events","assignees_url":"https://api.github.com/repos/D-Programming-Language/phobos/assignees{/user}","branches_url":"https://api.github.com/repos/D-Programming-Language/phobos/branches{/branch}","tags_url":"https://api.github.com/repos/D-Programming-Language/phobos/tags","blobs_url":"https://api.github.com/repos/D-Programming-Language/phobos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/D-Programming-Language/phobos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/D-Programming-Language/phobos/git/refs{/sha}","trees_url":"https://api.github.com/repos/D-Programming-Language/phobos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/D-Programming-Language/phobos/statuses/{sha}","languages_url":"https://api.github.com/repos/D-Programming-Language/phobos/languages","stargazers_url":"https://api.github.com/repos/D-Programming-Language/phobos/stargazers","contributors_url":"https://api.github.com/repos/D-Programming-Language/phobos/contributors","subscribers_url":"https://api.github.com/repos/D-Programming-Language/phobos/subscribers","subscription_url":"https://api.github.com/repos/D-Programming-Language/phobos/subscription","commits_url":"https://api.github.com/repos/D-Programming-Language/phobos/commits{/sha}","git_commits_url":"https://api.github.com/repos/D-Programming-Language/phobos/git/commits{/sha}","comments_url":"https://api.github.com/repos/D-Programming-Language/phobos/comments{/number}","issue_comment_url":"https://api.github.com/repos/D-Programming-Language/phobos/issues/comments{/number}","contents_url":"https://api.github.com/repos/D-Programming-Language/phobos/contents/{+path}","compare_url":"https://api.github.com/repos/D-Programming-Language/phobos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/D-Programming-Language/phobos/merges","archive_url":"https://api.github.com/repos/D-Programming-Language/phobos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/D-Programming-Language/phobos/downloads","issues_url":"https://api.github.com/repos/D-Programming-Language/phobos/issues{/number}","pulls_url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls{/number}","milestones_url":"https://api.github.com/repos/D-Programming-Language/phobos/milestones{/number}","notifications_url":"https://api.github.com/repos/D-Programming-Language/phobos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/D-Programming-Language/phobos/labels{/name}","releases_url":"https://api.github.com/repos/D-Programming-Language/phobos/releases{/id}","created_at":"2011-01-15T07:00:06Z","updated_at":"2015-06-17T14:55:53Z","pushed_at":"2015-06-21T05:51:19Z","git_url":"git://github.com/D-Programming-Language/phobos.git","ssh_url":"git@github.com:D-Programming-Language/phobos.git","clone_url":"https://github.com/D-Programming-Language/phobos.git","svn_url":"https://github.com/D-Programming-Language/phobos","homepage":"dlang.org/phobos","size":85907,"stargazers_count":609,"watchers_count":609,"language":"D","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":408,"mirror_url":null,"open_issues_count":80,"forks":408,"open_issues":80,"watchers":609,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/2845"},"html":{"href":"https://github.com/D-Programming-Language/phobos/pull/2845"},"issue":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/issues/2845"},"comments":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/issues/2845/comments"},"review_comments":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/2845/comments"},"review_comment":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/2845/commits"},"statuses":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/statuses/f64bb62f838da4ac897057d85288d4354f4c7258"}}}}