The egg shell color genetics are in two parts. There is an on and off switch for base color. Either the base color is blue or white. Blue is dominant. At this gene pair each chicken has two genes. If one of those genes is blue, the hen will lay a blue-based egg. If both those genes are blue she will lay a blue-based egg. If both of those genes are not-blue she will lay a white-based egg.
Each parent will contribute one gene to the chick. Which gene the parent gives the chick gets from that gene pair is random. If either parent is pure for the blue egg gene (Both their genes at that gene pair are blue) a pullet will lay a blue based egg as the chick is guaranteed to inherit at least one blue shell gene.
Maybe graphically will help. Consider O as the blue egg gene and o as the not-blue (white) gene. If one parent has O,O and the other has O,O or O,o or o,o. The chick will wind up with either O,O or O, o and lay a blue-based shell. It will get at least one blue gene.
If both parents are O,o then the chick could wind up with O,O, or O,o or o,o. So a pullet might lay a blue-based egg or a white-based egg. It's just luck.
If both parents are o,o (no blue egg gene) the the pullets will all lay a white based egg.
That may sound complicated but it is pretty basic, pure dominant/recessive genetics.
Now brown or green is where it gets complicated. At least 13 different genes have been identified as contributing to brown shell color. There are probably a lot more. A brown egg is a white egg with brown added. A green egg is a blue egg with brown added. This might help.
white + no white = white
white + brown = brown
blue + no brown = blue
blue + brown = green
Some of those 13 genes that contribute to brown are dominant, some are recessive. Some will only act if another certain gene is present. There is even a sex linked gene that bleaches out some brown. Most brown is put on top of the after the base shell has been added, you might think of this as a paint job right at the ed of the egg-making cycle. If you scrape the brown or green off you can see the base color. Or when you crack the egg and remove the membrane so you can see the inside of the shell you can see the base color. But there is one gene that can tint the shell all the way through. It's not very dark but it can keep a white egg from being pure white. A blue egg will still look blue with that gene.
Brown is a mess. How those dominants and recessives get passed down and how they go together can give you a lot of different shades of egg shells even from full sisters. Sometimes you can get some big surprises.