Unmanned aerial vehicle (UAV) has the advantages of flexible operation, simple structure, and low price, which has been widely researched. In recent years, the application of small UAVs has become more extensive, and the steady-state control of UAVs has great research prospects and value due to it being the key to better execute flight task. A PID steady-state control algorithm based on color recognition and target detection is designed herein. Firstly, it is necessary to calculate the distance between the coordinates of the center of the UAV screen and the geometric center of the target point. Secondly, a pixel distance correction algorithm based on actual distance is proposed so as to correct pixel distance deviation. Finally, it is necessary to control the speed of the UAV by a PID control algorithm to achieve the goal that the UAV is stable near the geometric center of the target point. In short, this algorithm realizes the functions of real-time video transmission of the UAV, flight data storage, color recognition, and speed control of the UAV based on the PID control algorithm and distance correction. The experimental results demonstrate that the proposed algorithm has good robustness, makes the UAV have better stability, and can be used for the process of target tracking in uncertain environments.