[Question]
  [
### Introduction
This is how a chessboard looks like.
[![enter image description here](https://i.stack.imgur.com/YxP53.gif)](https://i.stack.imgur.com/YxP53.gif)
You can see that `a1` is a **dark** square. However, `b1` is a **light square**.
### The Task
The challenge is, given `dark`, `light` or `both`, output all the **dark**, **light** or **all squares** *with a separator* (like a whitespace or a newline). The order of all the squares *does not matter*.
### Test cases
```
Input: dark
Output: a1 a3 a5 a7 b2 b4 b6 b8 
        c1 c3 c5 c7 d2 d4 d6 d8 
        e1 e3 e5 e7 f2 f4 f6 f8 
        g1 g3 g5 g7 h2 h4 h6 h8
Input: light
Output: a2 a4 a6 a8 b1 b3 b5 b7 
        c2 c4 c6 c8 d1 d3 d5 d7 
        e2 e4 e6 e8 f1 f3 f5 f7 
        g2 g4 g6 g8 h1 h3 h5 h7
Input: both
Output: a1 a2 a3 a4 a5 a6 a7 a8
        b1 b2 b3 b4 b5 b6 b7 b8
        c1 c2 c3 c4 c5 c6 c7 c8
        d1 d2 d3 d4 d5 d6 d7 d8
        e1 e2 e3 e4 e5 e6 e7 e8
        f1 f2 f3 f4 f5 f6 f7 f8
        g1 g2 g3 g4 g5 g6 g7 g8
        h1 h2 h3 h4 h5 h6 h7 h8
```
*Note:* I have prettified the output but this is **not necessary**.
This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), so the submission with the least amount of bytes wins!
  
[Answer]
## Pyth, ~~22~~ 21 bytes
*-1 byte by @Sp3000*
```
fn%Chz3%sCMT2sM*<G8S8
```
Under the function `%Chz3`, `dark` hashes to 1, `light` to 0, and `both` to 2. If we take the parity of the sum of the ords of a chess square (that is, `a1` -> `[97, 33]` -> `(97 + 33)%2` = `0`, dark squares go to 0, and light to 1. This allows us to filter by inequality.
```
fn%Chz3%sCMT2sM*<G8S8      implicit: z=input
               *           Cartesian product of
                <G8          first 8 letters in G (alphabet)
                   S8        with [1,...,8] implicitly stringified
             sM*<G8S8      ['a1','a2,...,'a8','b1'...'h8']
f          T               Filter that by gives truthy result to lambda T:
        sCMT                   The sum of the ords of the chars in T,
       %    2                  modulo 2
 n                            does not equal
   Chz                          ord of the first char in z,
  %   3                         modulo 3
                            Implicitly print the list.
```
Try it [here](https://pyth.herokuapp.com/?code=fn%25Chz3%25sCMT2sM%2a%3CG8S8&input=dark&test_suite=1&test_suite_input=dark%0Alight%0Aboth&debug=0).
[Answer]
# Bash + GNU Utilities, 74
```
printf %s\\n {a..h}{1..9}|sed -n "`sed '/[db]/a1~2p
/t/a2~2p
c/9/d'<<<$1`"
```
`{a..h}{1..9}` is a bash brace expansion that produces all the coordinates for an 8x8 board, plus an extra column `9`. This is important because it makes the row length odd which allows the chequerboard effect.
The `printf` simply formats each coordinate, one per line.
The built sed expression then deletes all `x9` coordinates and then prints either even or odd or both input lines, according to the script input.
[Answer]
## JavaScript (SpiderMonkey 30+), ~~90~~ ~~85~~ ~~83~~ 82 bytes
```
x=>[for(d of"12345678")for(c of"abcdefgh")if(x>'l'^parseInt(c+=d,19)%2|x<'d')c]+''
```
Returns a comma-separated string of squares. Compatible version for 99 bytes:
```
x=>([..."12345678"].map(d=>[..."abcdefgh"].map(c=>c+d).filter(s=>x>'l'^parseInt(s,19)%2|x<'d')))+''
```
Works by enumerating all 64 square names, then parsing them in base 19 to see whether they are light or dark modulo 2.
[Answer]
# JavaScript (ES6), 82 ~~87 98~~
Anonymous function returning a space separated string of squares.
```
i=>eval("for(o='',v=190;v<322;)v++%19<8&&i<'d'|v&1^i>'l'?o+=v.toString(19)+' ':o")
```
**TEST**
```
f=i=>eval("for(o='',v=190;v<322;)v++%19<8&&i<'d'|v&1^i>'l'?o+=v.toString(19)+' ':o")
// less golfed
q=i=>{
  // loop over the range of number a0 (base 19) to h8 (base 19)
  for(o='',v=190;v<322;) 
  {
    if (v++ %19 < 8) // increment and execute the line below only if second digit in 1..8
      if (i<'d'|v&1^i>'l') // even == light, odd == dark, take both if input is 'both'
        o+=v.toString(19)+' '
  }
  return o
}
document.write('<hr>Both<br>'+f('both'))
document.write('<hr>Light<br>'+f('light'))
document.write('<hr>Dark<br>'+f('dark'))
```
[Answer]
## Batch, 192 bytes
```
@set s=a1 a3 a5 a7
@set t=b2 b4 b6 b8
@if not %1==light call:b
@set s=a2 a4 a6 a8
@set t=b1 b3 b5 b7
@if %1==dark exit/b
:b
@echo %s% %s:a=c% %s:a=e% %s:a=g% %t% %t:b=d% %t:b=f% %t:b=h%
```
[Answer]
# Pyth, ~~48~~ 39 bytes
```
K*<G8S8Jfq%xGhT2%seT2K?qhz\bK?qhz\lJ-KJ
```
[Try it here!](http://pyth.herokuapp.com/?code=K*%3CG8S8Jfq%25xGhT2%25seT2K%3Fqhz%5CbK%3Fqhz%5ClJ-KJ&input=light&test_suite=1&test_suite_input=both%0Alight%0Adark&debug=0)
Still longer than the other Pyth solution, but I don't think I can beat this with my algorithm.
## Explanation
First we generate a list of all squares on the board and assign it to `Y`. Then we filter this list so that only light squares remain and assign this list to `J`. After that we evaluate the input and print:
* `Y` if input was `both`
* `J` if input was `light`
* `Y-J` if the input was `dark`
Determining if a square is light works as follows:
* Map the char to a number from 1-8 (a->1, b->2), results in `18` for `a8`, etc.
* check if both those numbers are odd or even (`x%2 == y%2`)
* If they are, the square is light, otherwise its dark
```
K*&ltG8S8Jfq%xGhT2%seT2K?qhz\bK?qhz\lJ-KJ  # z=input
 *                                         # Cartesian product of
  &ltG8                                      # first 8 letters of the alphabet (a-h)
     S8                                    # 1-indexed range (1-8)
K                                          # K holds now all squares
       f             K                     # Filter K 
        q                                  # is equal
         %xGhT2                            # map [a-h] to a number [1-8] and take it modulo 2
               %seT2                       # Take modulo 2 from the row number
                      ?qhz\bK              # If input starts with 'b' print K
                             ?qhz\lJ       # If it starts with 'l' print J
                                    -KJ    # Otherwise print the difference of those 2
```
[Answer]
## Python 2, ~~73~~ ~~71~~ 70 bytes
```
lambda s:[chr(x/8+97)+`x%8+1`for x in range(64)if x+x/8&1^ord(s[0])%3]
```
I'm still a bit confused whether functions are okay for the question, since the challenge mentions a "separator", but since there's a lot of other function submissions I've done the same.
Similar to [Erwan's answer](https://codegolf.stackexchange.com/a/73366/21487) but with a ~~lot~~ bit more Python 2-ness.
*(-2 bytes thanks to @xnor)*
[Answer]
# PHP, ~~132~~ ~~126~~ ~~120~~ ~~108~~ 106 bytes
```
for($s=strtr($argv[1],bdl,210);$c<8;$c++)for($r=0;$r<8;)if((++$r+$c)%2==$s||$s>1)echo"abcdefgh"[$c]."$r ";
```
It loops through the cols (0-7) and rows (1-8) and checks if the sum of both is odd/even.
Tested with PHP 5.6.4, run it: `php -d error_reporting=30709 -r '<CODE>' {dark|light|both}`
[Answer]
# [Vitsy](http://github.com/VTCAKAVSMoACE/Vitsy), ~~90~~ 82 bytes
```
'`'8\[1+8\:]Yy1-\?8\['1'v8\[vD1+vr?]vX]i'h'-)[88*\[Z?aO]]i'r'-)[?1m]1m
84*\[Z??aO]
```
Explanation of the first line:
```
'`'8\[1+8\:]Yy1-\?8\['1'v8\[vD1+vr?]vX]i'h'-)[88*\[Z?aO]]i'r'-)[?1m]i'g'-)[1m]
'`'                     Push ` to the stack. (this is 1 less than a in ASCII)
   8\[     ]            Do the stuff in brackets 8 times.
      1+                Add one on every recursion (this gets a, b, c, d...)
        8\:             Clone the stack 8 times. (This gets 8 of each a, b, c...)
Y                       Remove the current stack.
 y1-\?                  Go one stack to the left (I really need to builtin this)
8\[                 ]   Do the stuff in brackets 8 times.
   '1'                  Push character literal 1 to the stack.
      v                 Save it as a temporary variable.
       8\[       ]      Do the stuff in brackets 8 times.
          v             Push the temporary variable to the stack.
           D            Duplicate the top item of the stack.
            1+          Add one to it (this gives us 1, 2, 3, 4...)
              v         Capture the top item of the stack as a temporary variable.
               r        Reverse the stack.
                ?       Go a stack to the right.
                  vX    Clear the temporary variable slot.
i'h')[          ]       If the last character of the input is 'h', do the stuff in brackets
      88*\[    ]        Do the stuff in brackets 64 times.
           Z            Output everything in the stack as a character.
            ?           Rotate right a stack.
             aO         Output a newline.
i'r')[?1m]              If the penultimate character of the input is 'r', rotate over a 
                        stack, then execute the first index of lines of code.
1m                      Execute the first index of lines of code.
```
Explanation of the second line:
```
84*\[Z??aO]
84*\[     ]   Do the stuff in brackets 32 times.
     Z        Output everything in the stack as a char.
      ??      Rotate two stacks over.
        aO    Output a newline.
```
There will be bonus trailing newlines for 'dark' and 'both'. Requires that only 'dark', 'both', or 'light' will be input.
[Try it online!](http://vitsy.tryitonline.net/#code=J2AnOFxbMSs4XDpdWXkxLVw_OFxbJzEndjhcW3ZEMSt2cj9ddlhdaSdoJy0pWzg4KlxbWj9hT11daSdyJy0pWz8xbV0xbQo4NCpcW1o_P2FPXQ&input=&args=bGlnaHQ)
[Answer]
## PowerShell v3+, ~~142~~ 129 bytes
```
param($a)$d=$a[0]-in('d','b');$l=$a[0]-in('l','b')
97..104|%{$i=[char]$_;1..8|%{if((($q=($_+$i)%2)-eq$l)-or($q+1-eq$d)){"$i$_"}}}
```
Takes input `$a` and sets two variables for if we're to output `$d`ark or `$l`ight squares based on the first letter of the input.
Then, we loop over `a-h` and `1-8` and uses the same trick as on [Determine the color of a chess square](https://codegolf.stackexchange.com/a/64050/42963) to parse whether it's a light or dark square (setting helper variable `$q` in the first test) and add that square to the pipeline if appropriate. After execution, the elements on the pipeline are output one per line.
Requires v3 or newer for the `-in` operator.
Edit - Saved 13 bytes by eliminating the `switch` and by changing equality testing order
[Answer]
# Jolf, 48 bytes
```
Ζ-ώ~1tΜ fΜZAQ8ΨΖ+ζ|<%ζγwώt8ώ6d|<i'd!x%H2>i'ldbHγ
```
It's all greek to me ¯\\_(ツ)\_/¯ This is a transpiling of edc65's excellent answer.
```
Ζ-ώ~1t
Ζ        set ζ to 
  ώ~1     100 * 2
 -   t    minus 10 (=190)
ΜZAQ8ΨΖ+ζ|<%ζγwώt8+2t
 ZAQ8                 A zero array of length Q8 (8*8 = 64)
Μ    Ψ                map that
      Ζ+ζ             ζ += 
           %ζγwώt       ζ % (γ = 19)
          <      8      < 8
         |        ώ6  || 12
Μ f■above thing■d|<i'd!x%H2>i'ldbHγ
 _f■above thing■d                    filter the above thing
                 |<i'd!x%H2>i'l      removing all the bad stuff (i<'d'|v%2^i>'l')
Μ                              dbHγ  map each character to base 19
```
[Answer]
# Perl, 69 + 3 = 72 bytes
```
$b=/b/;$i=/l/;$_="@{[grep{$i=!$i||$b}map{$l=$_;map{$l.$_}1..8}a..h]}"
```
To be run with `perl -p`, for which I've added 3 bytes.
Less-golfed version (slightly different, as the babycart operator makes it hard to format nicely):
```
$b=/b/;                       # flag for input containing b
$i=/l/;                       # start $i as true if input contains 'l'
@a = grep {
    $i = !$i||$b                # alternate unless $b is true
} map {
    $l = $_;                    # save letter
    map {
        $l.$_                   # join letter and number
    } 1..8                      # generate number sequence
} a..h;                         # generate letter sequence
# golfed version uses babycart operator around array expr to save one byte
$_ = "@a"                       # write array, separated
```
The golfed version uses [`"@{[]}"`](http://search.cpan.org/dist/perlsecret/lib/perlsecret.pod#Baby_cart); the commented version uses `@a=...; "@"` so that the commented code is still runnable.
[Answer]
# C++, 132 bytes
Takes input by command-line. Uses pointer/modulo voodoo for print condition.
```
#include<stdio.h>
int main(int i,char**v){for(int n=0;n<64;n++)if((n+(i=n/8))%2-*v[1]%3){putchar(i+97);putchar(n%8+49);putchar(32);}}
```
[Answer]
# Java, 143
```
class H{public static void main(String[]a){for(char
c=96;++c<'i';)for(int
i=0;++i<9;)if((i+c)%2!=a[0].charAt(0)%3)System.out.println(c+""+i);}}
```
Hey, it's not the longest answer :)
Input is taken as a command-line argument.
[Answer]
# PHP, ~~99~~ ~~82~~ ~~79~~ ~~76~~ ~~74~~ 73 bytes
Uses ISO 8859-1 encoding.
```
for($z=$argv[1];++$x<72;)$x%9&&$z<c|$z>k^$x&1&&print~ß.chr($x/9+97).$x%9;
```
Run like this (`-d` added for aesthetics only):
```
php -d error_reporting=30709 -r 'for($z=$argv[1];++$x<72;)$x%9&&$z<c|$z>k^$x&1&&print~ß.chr($x/9+97).$x%9; echo"\n";' dark
```
It works like this: variable `$x` is incremented from 1 to 71, the numbers correspond to the cells as shown below.
```
r\c 1  2  3  4  5  6  7  8  [invalid column]
A   1  2  3  4  5  6  7  8  9
B  10 11 12 13 14 15 16 17 18
C  19 20 21 22 23 24 25 26 27
D  28 29 30 31 32 33 34 35 36
E  37 38 39 40 41 42 43 44 45
F  46 47 48 49 50 51 52 53 54
G  55 56 57 58 59 60 61 62 63
H  64 65 66 67 68 69 70 71 72
```
Therefore, `$x modulo 9` yields the column number and `$x / 9` yields the row number, which I convert to a letter using `chr`. The code `$z<c|$z>k^$x&1` yields `true` for input `both` (`$z<c`) and in the case of `light` or `dark` only for the even or odd cells respectively (`$z>k ^ $x&1`). The result of this expression determines whether or not the cell coordinates will then be printed. Finally, if `$x modulo 9` results in `0`, I skip that non-existant cell.
* Saved ~~18~~ 17 bytes (fixed a bug) by having only 1 loop, converting the number to a char instead of the other way around
* Saved 3 bytes by combining the condition for dark and light with a `xor`
* Saved 3 bytes by comparing against the full input instead of the first char
* Saved 2 bytes because no longer need to subtract `.125` in the expression `$x/9+69.9` to get the correct row number before converting to a char
* Saved a byte by using `~ß` to yield a space
[Answer]
# JavaScript ES6, ~~187~~ ~~160~~ 159 bytes
~~I'm probably missing something painfully obvious.~~ Oh well. Not having to flatten the array helps.
```
l=s=>(E=[2,4,6,8],O=[1,3,5,7],h=(z=s[0]=="d")?O:E,d=z?E:O,[...h.map(t=>[..."aceg"].map(e=>e+t)),...(d.map(t=>[..."bdfh"].map(e=>e+t))),...(s[0]=="b"?l`d`:[])])
```
Returns a 2D array.
---
Try it here:
```
l=s=>(E=[2,4,6,8],O=[1,3,5,7],h=(z=s[0]=="d")?O:E,d=z?E:O,[...h.map(t=>[..."aceg"].map(e=>e+t)),...(d.map(t=>[..."bdfh"].map(e=>e+t))),...(s[0]=="b"?l`d`:[])])
U=x=>o.innerHTML=JSON.stringify(l(i.value));
i.onchange=U;U();
```
```
*{font-family:Consolas,monospace;}
```
```
<select id=i><option value="light">light</option><option value="dark">dark</option><option value="both">both</option></select><div id=o></div>
```
[Answer]
# Ruby, 85
I think there are shorter ways about this, but this is a cute use of `.upto`.
```
gets;'a1'.upto('h8'){|e|puts e if e[/[1-8]/]&&(~/b/||((e.ord%2!=e[1].ord%2)^! ~/l/))}
```
[Answer]
# R, ~~129~~ 94 bytes
I knew I could generate the board better :). Essentially this builds an inverted board, filtering out grid references where the shade does not match the input. Output is space separated.
```
a=which(array(c('light','dark'),c(9,9))[-9,-9]!=scan(,''),T);cat(paste0(letters[a[,1]],a[,2]))
```
Ungolfed
```
a=which(                           # Get the indexes of
  array(c('light','dark'),c(9,9))  # an array of light dark
    [-9,-9]                        # except for the ninth row and column
      !=scan(,'')                  # where the value doesn't equal the input
    ,T                             # return array index not vector
  );
cat(paste0(letters[a[,1]],a[,2]))  # using letters for col
```
Test
```
> a=which(array(c('light','dark'),c(9,9))[-9,-9]!=scan(,''),T);cat(paste0(letters[a[,1]],a[,2]))
1: dark
2: 
Read 1 item
a1 c1 e1 g1 b2 d2 f2 h2 a3 c3 e3 g3 b4 d4 f4 h4 a5 c5 e5 g5 b6 d6 f6 h6 a7 c7 e7 g7 b8 d8 f8 h8
> a=which(array(c('light','dark'),c(9,9))[-9,-9]!=scan(,''),T);cat(paste0(letters[a[,1]],a[,2]))
1: light
2: 
Read 1 item
b1 d1 f1 h1 a2 c2 e2 g2 b3 d3 f3 h3 a4 c4 e4 g4 b5 d5 f5 h5 a6 c6 e6 g6 b7 d7 f7 h7 a8 c8 e8 g8
> a=which(array(c('light','dark'),c(9,9))[-9,-9]!=scan(,''),T);cat(paste0(letters[a[,1]],a[,2]))
1: both
2: 
Read 1 item
a1 b1 c1 d1 e1 f1 g1 h1 a2 b2 c2 d2 e2 f2 g2 h2 a3 b3 c3 d3 e3 f3 g3 h3 a4 b4 c4 d4 e4 f4 g4 h4 a5 b5 c5 d5 e5 f5 g5 h5 a6 b6 c6 d6 e6 f6 g6 h6 a7 b7 c7 d7 e7 f7 g7 h7 a8 b8 c8 d8 e8 f8 g8 h8
>
```
[Answer]
# Oracle SQL 11.2, ~~192~~ 180 bytes
```
SELECT CHR(64+x),DECODE(y,0,8,y)FROM(SELECT CEIL(LEVEL/8)x,MOD(LEVEL,8)y FROM DUAL CONNECT BY LEVEL<=64)WHERE(:1='dark'AND MOD(x+y,2)=0)OR(:1='light'AND MOD(x+y,2)=1)OR(:1='both');
```
Un-golfed
```
WITH v AS
(
  SELECT CEIL(LEVEL/8)x, DECODE(MOD(LEVEL,8),0,8,MOD(LEVEL,8))y  
  FROM DUAL CONNECT BY LEVEL<=64
)
SELECT CHR(64+x),y
FROM   v
WHERE  (:1='dark' AND MOD(x+y,2)=0)OR(:1='light' AND MOD(x+y,2)=1)OR(:1='both');
```
The v view generate the coordinates of each square. If the sum of the coordinates is even then the square is black, else it's white.
[Answer]
**Rust, ~~263~~ ~~259~~ 244 Bytes**
```
use std::char;use std::env;fn main(){let n=env::args().nth(1).unwrap();for i in 0..8{for j in 0..8{if n=="both"||(n=="dark"&&(i+j)%2==0)||(n== "light"&&(i+j)%2!=0){println!("{}{}",char::from_u32(i+97).unwrap(),char::from_u32(j+49).unwrap())}}}}
```
Expanded Form:
```
fn main() {
    let input = env::args().nth(1).unwrap();
    for i in 0..8{
            for j in 0..8{
                if input == "both"
                || (input == "dark" && (i+j)%2==0)
                || (input == "light" && (i+j)%2!=0){
                    println!("{}{}",char::from_u32(i+97).unwrap(),char::from_u32(j+49).unwrap());
            }
        }
    }
}
```
[Answer]
# [MATL](https://esolangs.org/wiki/MATL), 31 bytes
```
1)t3\8:t!++w4\~?H\]2#f2Y2!w)wVh
```
[**Try it online!**](http://matl.tryitonline.net/#code=MSl0M1w4OnQhKyt3NFx-P0hcXTIjZjJZMiF3KXdWaA&input=J2Rhcmsn)
[Answer]
# CJam, 29
```
qci3%:X;8Ym*{~+2%X-},"a1 "f.+
```
Just a quick and dirty solution :p  
[Try it online](http://cjam.aditsu.net/#code=qci3%25%3AX%3B8Ym*%7B%7E%2B2%25X-%7D%2C%22a1%20%22f.%2B&input=dark)
**Explanation:**
```
q           read the input
ci          convert to (first) character then to integer
3%          modulo 3; results for d(ark), l(ight) and b(oth) are 1, 0, 2
:X;         store in X and pop
8Ym*        generate all pairs (Y=2) of numbers from 0 to 7
{…},        filter using the condition block
  ~         dump the current pair on the stack
  +2%       calculate the sum modulo 2
  X-        subtract X; if the result is not 0, the pair is kept
"a1 "f.+    vectorized-add "a1 " to each remaining pair
             this means the character 'a' is added to the first number,
             the character '1' is added to the second number,
             and then the space character is appended
            the contents of the stack are automatically printed at the end
```
[Answer]
# Haskell, 133 116 105 100 98 91 bytes
```
f r=[["abcdefgh"!!x,"12345678"!!y]|x<-l,y<-l,odd(x+y)||r<"l",even(x+y)||r!!0/='d']
l=[0..7]
```
This is my first attempt at golfing Haskell. 
With some help from Michael Klein, we managed to get it under 100 chars!
[Answer]
# Mathematica 133 bytes
**Method 1**: 108 bytes. This constructs the board as a table, with labels in each cell, and returns light or dark diagonals or bands as required.
```
Table[Table[{i,j},{i,{h,g,f,e,d,c,b,a}},{j,Range@8}]~Diagonal~k,{k,If[#=="light",-6,-7],7,If[#=="both",1,2]}]&
```
---
```
%["light"]   (*where % repeats the preceding line *)
```
> 
> {{{b, 1}, {a, 2}}, {{d, 1}, {c, 2}, {b, 3}, {a, 4}}, {{f, 1}, {e, 
>  2}, {d, 3}, {c, 4}, {b, 5}, {a, 6}}, {{h, 1}, {g, 2}, {f, 3}, {e, 
>  4}, {d, 5}, {c, 6}, {b, 7}, {a, 8}}, {{h, 3}, {g, 4}, {f, 5}, {e, 
>  6}, {d, 7}, {c, 8}}, {{h, 5}, {g, 6}, {f, 7}, {e, 8}}, {{h, 7}, {g,
>  8}}}
> 
> 
> 
---
**Method 2**: 133 bytes. Creates an array and selects according to the even-odd nature of the sum of the row number + column number of each cell.
```
Position[Array[Boole@OddQ[#+#2] &,{8,8}],Switch[#,"dark",0,"light",1,"both",0|1]]/.
{j_,k_}:>{j/.Thread[Range@8->{a,b,c,d,e,f,g,h}],k}&
```
---
[Answer]
# JS, 197 bytes
```
b=[];d=[];l=[];for(i=1;i<9;i++){for(j=1;j<9;j++){a=String.fromCharCode(96+i*1)+j;b.push(a);if((i+j)%2<1){d.push(a)}else{l.push(a)}}}m=[0,"both",b,"dark",d,"light",l];alert(m[m.indexOf(prompt())+1])
```
[Answer]
## Python (3.5), ~~106~~ ~~100~~ ~~96~~ 92 bytes
use the trick of MegaTom `(i+j)%2` to win 6 bytes
```
f=lambda s:[chr(97+i//8)+str(1+i%8)for i in range(64)if s[0]=='b'or(i//8+i)%2==(s[0]=='l')]
```
[Try it on repl.it](https://repl.it/Bn5f/3)
## Results
```
>>> f('light')
['a2', 'a4', 'a6', 'a8', 'b1', 'b3', 'b5', 'b7', 'c2', 'c4', 'c6', 'c8', 'd1', 'd3', 'd5', 'd7', 'e2', 'e4', 'e6', 'e8', 'f1', 'f3', 'f5', 'f7', 'g2', 'g4', 'g6', 'g8', 'h1', 'h3', 'h5', 'h7']
>>> f('dark')
['a1', 'a3', 'a5', 'a7', 'b2', 'b4', 'b6', 'b8', 'c1', 'c3', 'c5', 'c7', 'd2', 'd4', 'd6', 'd8', 'e1', 'e3', 'e5', 'e7', 'f2', 'f4', 'f6', 'f8', 'g1', 'g3', 'g5', 'g7', 'h2', 'h4', 'h6', 'h8']
>>> f('both')
['a1', 'a2', 'a3', 'a4', 'a5', 'a6', 'a7', 'a8', 'b1', 'b2', 'b3', 'b4', 'b5', 'b6', 'b7', 'b8', 'c1', 'c2', 'c3', 'c4', 'c5', 'c6', 'c7', 'c8', 'd1', 'd2', 'd3', 'd4', 'd5', 'd6', 'd7', 'd8', 'e1', 'e2', 'e3', 'e4', 'e5', 'e6', 'e7', 'e8', 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'g1', 'g2', 'g3', 'g4', 'g5', 'g6', 'g7', 'g8', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'h7', 'h8']
```
**Previous version**
```
f=lambda s:[i for i in[i+j for i in'abcdefgh'for j in'123456780'][s[0]=='l'::2-(s[0]=='b')]if'0'not in i]
```
[Answer]
C++, 119 Bytes 
Based on MegaTom's trick.
```
#include <stdio.h>
int main(int n,char**v){for(n=0;n<64;++n){if((n+n/8)%2-**(v+1)%3){printf("%c%c ",n/8+97,n%8+49);}}}
```
[Answer]
# [C (gcc)](https://gcc.gnu.org/), 112 bytes
```
f(char*s){for(int m=*s^'d'?*s^'l'?3:2:1,l=64,x;l--;m&1&!x|(m&2&&x)&&printf("%c%d ",l%8+97,l/8+1))x=l%8%2^l/8%2;}
```
[Try it online!](https://tio.run/##PY7bCoMwEESfzVfYQGKikaItrVXEHxHBJnih8YKxRbB@u42C3ZfZmeUwy92S83UtCK/ywVZ0LrqB1O1oNrGtMktYySbSSi6hH3pMxrcrmyLpulGDPXyavqTBPsYTxbgfNFcQiDgSJmQSBc7jzuQ5cDxKp1h75GfaIj9a1k9XC7M8WsEMjD@u0tbVk7aQmYpGwCiIlv49KgJ1qJMFgP3FvG7JzpYEinx4bbdtl3VZjYd5dmO1Q@sP "C (gcc) – Try It Online")
If a == 1, then a square will always be black if the "oddness" of row and column is the same, i.e. both are odd or both are even. The opposite is true for white squares, where row and column will always differ in oddness.
After that, it's just a matter of combining row and column loops, as well as consulting a table of operator precedence until a sufficient level of incomprehensibility has been reached.
]