implement read bits value and color rectangle