modulate() mainly applies to CanvasItems, and anything that inherits from them, like Sprites. If you want to use modulate, the easiest way would be to make a new sprite and set it's texture as the graphic.
var sprite = Sprite.new()
sprite.texture = load('res://icon.png')
sprite.modulate = Color(1.0, 0.0, 0.0, 1.0)
add_child(sprite)