How to displaying color bar for dynamic content

I have been using the Volume Shader example here to display a model whose color limits (clim1 and clim2) can be changed to make the model color look different. I wanted to create a color bar with numerical labels that dynamically changes as the color limits are changed by the user. So, I was wondering if there was a way to apply a color bar that provides the user with info about what values are assigned to a region in the model and adjusts accordingly if the user changes the color limits?