BarLegend
BarLegend[cf] generates a legend that identifies colors from the color function cf with an automatic range of values.
BarLegend[{cf,{min,max}}] generates a legend that identifies colors from the color function cf with the range of values between min and max.
BarLegend[cf,contours] generates a legend that identifies color ranges from the color function cf based on the set of contours contours.
Please visit the official Wolfram Language Reference for more details and examples on core symbols.