Partitions and its generalizations are important research objects. For two integers z, j with \(1\le j\le z\) , (z, j)-colored partitions of a positive integer n are those z-colored partitions of n in which at most j colors can appear for a given part size. Let \(c_{z,j}(n)\) be the number of (z, j)-colored partitions of n. In this paper, for every prime \(p\ge 5\) , we determine all positive integers k, l, j, a, b with \(1\le j<p^k\) and \((a, b)=1\) such that \(c_{p^k,j}(an+b)\equiv 0\pmod {p^{l}}\) for all nonnegative integers n.