Yes, it will work either way. An eggshell can have one of two base colours: white or blue. The gene for blue eggs is dominant over the gene for white eggs. The brown colour is due to any number of other genes and is basically a brown coating over top of the underlying eggshell colour. So if you breed a blue egg layer to a brown egg layer, you will get a blue egg with a brown coating and the egg will look sort of olive green. If the hen just adds a pale brown coating (e.g. if you cross with a breed that lays beige eggs) it will be a lighter green or teal colour.
If you're breeding to a hen or rooster that carries two copies of the blue egg gene (homozygous for that trait), then all of the progeny will receive one of those genes and because blue is dominant over white they will all lay blue eggshells. But if the blue egg parent is heterozygous (one blue gene and one white gene) and you breed to a white eggshell chicken (e.g. either white or brown which is actually white with a brown coating), then half of the babies would get the blue eggshell gene (they would be heterozygous for that trait) and half would get the white eggshell gene (and would be homozygous for that trait).
Most true Ameraucanas are homozygous for blue eggshells but the odd beige egg layer does crop up. Many EEs are homozygous too but many are heterozygous and some lack the blue gene altogether.
Bottom line: if a chicken lays blue eggs then you know it carries at least one blue eggshell gene, but you won't know whether it carries two (although a purebred almost certainly will).