To set certain patches color with ticks, I think you need to add more conditions to your if statement. For example, this code will change color of patches in the corner if ticks are bigger than 500,
ask patches [
if (ticks > 500) and (pxcor > 5) and (pycor > 5) and (pzcor > 5)[
set pcolor 12 + random 16
]
]
Hope this helps.