In this paper an improvement of the white patch method, a color constancy algorithm, is proposed. The improved method is tested on several benchmark databases and it is shown to outperform the baseline white patch method in terms of accuracy. On the benchmark database it also outperforms most of the other methods and its great execution speed makes it suitable for hardware implementation. The results are presented and discussed and the source code is available at http://www.fer.unizg.hr/ipg/resources/color constancy/.