cause i want to change the color of some black lines by locking the layer and coloring just the lines but since it's one page even the white space get colored. don't you guys have an easy way to do that beside wand and eraser. (cause i might have this probleme for all my images and i think it's annoying to use wand every time)
Use your image as layer mask for a colored layer. Increase the contrast with curves tool to have both full black and full white. Invert the mask to make the original white areas transparent.
Coarse coloring under the lines is enough to make the lines colored. Here the blue background is added to prove the existence of the transparency. The colors can be arbitary. Here a gradient black-white-orange is applied.
- turn your image to RGB (Image > Mode > RGB)
- add a new layer on top in the layers panel, duplicate it
- rename the top layer to Color copy
- rename the 2nd from top layer to Background, fill it with some solid color to see the forthcoming result well
- fill the top layer (=Color copy) with some other color that is good for the strokes
- goto your image layer, select all and copy to the clipboard
- goto the "Color copy" layer and insert a layer mask in the layers panel
- click the mask icon in the layers panel holding the Alt key at the same time. This brings the mask onscreen (should be white now)
- paste in place (Ctrl+Shift+V) the image to the layer mask
- invert the layer mask (Image > Adjustments > Invert)
- with the curves tool (Image > Adjustments > Curves) or with the levels tool adjust the contrast and brightness until the strokes have plenty of white and the background is black
- click the image icon of Colored copy layer to make the colored image visible against the test background. You can do this also before applying the curves tool. The edits affect the layer mask if the layer mask icon is selected and the image is visible at the same time
You can fix the effect of the layer mask by "Apply layer mask", but I cannot see what benefits you gain with it except simplifying the game a little and, of course, your white has now literally changed to transparency.
Having the layer mask you can freely test different colorings without destroying your drawing. You can even wipe off something non-destructively using the eraser. It must be applied to the color, not to the layer mask.
The fastest way to color black lines is to use the bucket fill tool with the chosen color as foreground and with blend mode Color.
To avoid coloring of light grey lines you may need to adjust the black threshhold of your source image.