<｜begin▁of▁sentence｜>### Instruction:
Given a palette with three defined colors (red, green, and blue), how would you retrieve the red color's RGBA value using the get method? Demonstrate this by printing the result. Additionally, show how to clear the cache and then retrieve the blue color's RGBA value by name.
### Response:
from igraph.drawing.colors import Palette

# Create a palette object
palette = Palette(n=3)
# Define colors in the palette
palette[0] = '#ff0000' # Red color
palette[1] = '#00ff00' # Green color
palette[2] = '#0000ff' # Blue color

# Get a color from the palette by index
red_color = palette.get(0)
print('Red color RGBA:', red_color)

# Clear the cache if needed
palette.clear_cache()

# Get a color from the palette using a color name
blue_color = palette.get('blue')
print('Blue color RGBA:', blue_color)
<|EOT|>
