Can you clarify in the comments that this function expects a range of 0 to 255?