Magnetic domains in ultrathin films form domain patterns, which strongly depend on the magnetic anisotropy. The magnetic anisotropy in Co/Ni multilayers changes with the number of layers. We provide a model to simulate the experimentally observed domain patterns. The model assumes a layer-dependent magnetic anisotropy. With the anisotropy parameter estimated from experimental data, we reproduce the magnetic domain patterns.