I'm making a configurable product in which i have two dependable attributes i.e color and size, so the issue is i am not getting how to give both the attribute different prices and make the size dependable on the size?

Hi,

I’m making a configurable product in which i have two dependable attributes i.e color and size, so the issue is i am not getting how to give both the attribute different prices and make the size dependable on the size,

For instance :
color : red, blue
Size : s,xl,2xl,3xl

so i want size dependent on the size it is done but how to give the red attribute to price $30 and blue to $40, and further s = $20, xl=$30, make sense ?

So can any one help me, i’m also digging the google.

Read the Mage2 User Manual. You have to create simple products for each configuration, i.e. blue/S is one simple with a price, red/L is one simple with a different price. The configurable product just unifies the configuration under one name. Each configuration is a product of its own.
Using the backend, you can generate the simple products automatically.