How can I draw this style of grid? I'm trying to write code (in any language) to render this 3D grid, matching the look and colors as closely as possible:
You can do it by only rendering a flat plane and then making a grid in fragment shader. This is actually a nice exercise. 

To get these two color values, you can use color selector, which is available in any graphic software for example MS Paint

Some code hints:

vec2 coord = worldPos.xz / stepSize; //square size in world space
vec2 frac = fract(coord); //fractional parts of squares
//interpolation, grad is smoothness of line gradients
vec2 mult = smoothstep(0.0, grad, frac) - smoothstep(1.0-grad, 1.0, frac);
vec3 col = mix(col1, col2, mult.x * mult.y);