# How to add color BarLegend here?

How can I add a BarLegend to the following plot?

b[x_] := x;
p1 =
Show[
Graphics[
Table[{Hue[i/20], Circle[{0, 0}, b[i]]}, {i, 1, 6, 0.1}],
ImageSize -> 350
], Frame -> True
]

• Have you already seen Legended[]? 2 days ago
• yes. Not working.
– AKU
2 days ago
• Well, the hope was that you'd see that Legended[] needs a second argument that is something like BarLegend[{Hue[#/20] &, {1, 6}}], depending on what you are trying to do (which you have not mentioned so far in your question, but should have been there). 2 days ago
• Here if you run this code, you will see colored concentric circles dur to Hue. I want to show in the BarLegend that color variation with i.
– AKU
2 days ago
• @AkhilUniyal Yeah, it can be done, but it is different enough from this question that it probably warrants asking a new question about it. 2 days ago

ClearAll[b]