I hope you can only use EV3 Color Sensor for line following and sensing colors. There are 3 modes for the Color Sensor. You can use 2 of them for these tasks:
1.) Color Mode
This mode is best suited for sensing colors. This is really useful if the darkness of the Colors are same. It can only sense a handful of Colors: Black, Blue, Green, Yellow, Red, White and Brown. If you don't want to make your Robot follow the line precisely you can use this mode.
2.) Reflected Light Intensity
This is used to determine the reflection of the surface. This is very useful if you want to make your Robot follow the line precisely. Let's say if you want your Robot to follow in between the black line and the white line. You can get the reflected values of the white surface and the black surface and add them and dividing them by 2 will give the threshold value to make your Robot follow in between the black and white line. It is generally used to measure the darkness of a surface. The more darker the surface,lesser is the reflection. The more brighter the surface, more is the reflection.
Unfortunately you can't use both the modes simultaneously in EV3 as it will result in resource conflict letting your Robot to crash. Instead you can use 2 Color sensors to use both the modes simultaneously in each sensor.