Commas around "which"
I was talking about a new logo with a friend and I asked him why there's so much white. He told me that it's not white, he just doesn't know what colour will it be. I replied:
Then use transparent background, which, unlike white, couldn't end up in the final logo.
The question is, are the commas properly placed in the sentence?
Yes, those commas are all fine.
The comma after background sets off a nonrestrictive clause ("which couldn't end up in the final logo").
The comma after which sets off a parenthetical clause ("unlike white").
The comma after white marks the end of the parenthetical clause.
Yes. But let me give the correct explanation.
The expression starting with "which" begins a non-restrictive phrase (not a subordinate clause). A non-restrictive phrase or clause (1) renames something or (2) provides an additional description that is not necessary to distinguish the thing from similar things--meaning it is unnecessary for understanding the point of the sentence.
All non-restrictive phrases and clauses are set off from the main sentence by commas. Thus, in this case, you need the comma before "which."
Another example of a non-restrictive phrase is "I just heard from my father, who is in Borneo." The non-restrictive clause is "who is in Borneo," and it is correctly set off from the main sentence with a comma.
"Unlike white" is, indeed, a parenthetical expression and is correctly set off with commas.
For more on commas with "which" and non-restrictive phrases and clauses, you might check out "A Cauldron of Commas" (comma use two): http://zencomma.wordpress.com/2011/10/04/a-cauldron-of-commas/ and "That vs. Which": http://300daysofbetterwriting.wordpress.com/2010/04/12/that-vs-which/ .