update colour coding when locking/unlocking