<!DOCTYPE html>
<svg width="400" height="250">
    <defs>
        <mask id="m1" x="0" y="0" width="1" height="1" maskContentUnits="objectBoundingBox">
            <rect width="0.5" height="0.5" fill="white"/>
        </mask>
        <mask id="m2a" x="0" y="0" width="1" height="1" maskContentUnits="objectBoundingBox">
            <rect width="0.5" height="0.5" fill="white"/>
        </mask>
        <mask id="m2b" x="0" y="0" width="1" height="1" maskContentUnits="objectBoundingBox">
            <rect x="0.5" y="0.5" width="0.5" height="0.5" fill="white"/>
        </mask>
        <mask id="m3" x="0" y="0" width="1" height="1" maskContentUnits="objectBoundingBox">
            <rect x="0.5" y="0.5" width="0.5" height="0.5" fill="white"/>
        </mask>
        <mask id="m4" x="0" y="0" width="1" height="1" maskContentUnits="objectBoundingBox">
            <rect width="0.5" height="0.5" fill="white"/>
        </mask>
        <mask id="m5" x="0" y="0" width="1" height="1" maskContentUnits="objectBoundingBox">
            <rect width="0.5" height="0.5" fill="white"/>
        </mask>
        <mask id="m6" x="0.5" y="0" width="1" height="1" maskContentUnits="objectBoundingBox">
            <rect width="0.5" height="0.5" fill="white"/>
        </mask>
        <mask id="m7" x="0" y="0" width="1" height="1" maskContentUnits="objectBoundingBox">
            <rect width="0.5" height="0.5" fill="#808080"/>
        </mask>
        <mask id="m8" x="0" y="0" width="1" height="1" maskContentUnits="objectBoundingBox">
            <rect x="0.5" width="0.5" height="0.5" fill="white"/>
        </mask>
    </defs>
    <rect id="r1" x="50" y="50" width="50" height="50" mask="url(#m1)"/>
    <rect id="r2" x="150" y="50" width="50" height="50" mask="url(#m2b)"/>
    <rect id="r3" x="250" y="50" width="50" height="50"/>
    <rect id="r4" x="350" y="50" width="50" height="50" mask="url(#m4)" fill="blue"/>
    <rect id="r5" x="50" y="150" width="50" height="75" mask="url(#m5)"/>
    <rect id="r6" x="150" y="150" width="50" height="50" mask="url(#m6)"/>
    <rect id="r7" x="250" y="150" width="50" height="50" mask="url(#m7)"/>
    <rect id="r8" x="350" y="150" width="50" height="50" mask="url(#m8)"/>
</svg>
