Something like this, perhaps [minimally tested]?
(defun C:SLC (/ p1 p2 drop p3 dropang); = Sloped Lines Color-coded
(setq
p1 (getpoint "\nStart/left end of Line: ")
p2 (getpoint p1 "\nPoint with X coordinate of right end of Line: ")
drop (getdist p2 "\nDrop distance from left to right: ")
p3 (list (car p2) (- (cadr p1) drop))
dropang (angle p1 p3)
); setq
(command
"_.line" p1 p3 ""
"_.chprop" "_last" "" "_color"
(cond
((> dropang (* pi 1.95)) 90); green ;;; EDIT multipliers & color numbers as desired
((> dropang (* pi 1.9)) 50); yellow
((> dropang (* pi 1.8)) 40); orange
(10); red [anything steeper]
); cond
""
); command
(princ)
); defun
It asks for the start and X-position-of-end for one Line, but could be made to repeatedly ask for the next X-of-end pick in a series such as in my earlier image, if that's what you need. That is, as written, to do that kind of series, you have to pick on the right end of the previous Line for the left start of the next one, but it could be made to use that previous-Line right end for the next-Line left end automatically.
And note that though it uses rubber-banding for the 'p2' and 'drop' settings, it does not just use the picked points, but operates as I think your description indicates -- it uses only the X coordinate of the 'p2' pick location, and it takes the 'drop' distance, however specified [picked relative to p2, or typed in] off the Y coordinate of 'p1' , not off p2 that it's rubber-banding from. If that's confusing, the rubber-banding can be eliminated.
It also does not check for other things that it could, for example that the second point is actually to the right of the first one, but such things could be added easily enough. Consider other optional approaches, such as putting the Lines on different Layers with those colors, depending on their slopes, rather than forcing a color override on them.
Kent Cooper, AIA