The complementary color of #4040D8 is the color #D8D840
The HSL model was used to determine the complementary color