Contrastive analysis and climatic response of tree-ring gray values and tree-ring densities