Smart dyes