We investigate a new tool for measuring whiteness. We first introduce a quantity which has suitable properties for constructing a test for randomness. We provide the exact asymptotic power of our test. Finally, we experimentally assess the power and usefulness of our test. Copyright 2007 The Author Journal compilation 2007 Blackwell Publishing Ltd.