The invention discloses a programming device for control based on color recognition and a method thereof, and solves the problems that in the prior art, an upper computer is tedious in operation and inconvenient to use, the programming device comprises a base, instruction building blocks and an executing mechanism, a shell control panel is arranged on the base, and a plurality of building block slots are formed in the shell control panel; a color sensor is arranged in the building block slot, the surface of the instruction building block is coated with a color coating, the instruction building block is detachably installed in the building block slot, a single-chip microcomputer, a communication module, a power supply module and a controller which are connected with one another are further arranged in the base, the single-chip microcomputer is connected with the color sensor, and the communication module is connected with an executing mechanism. According to the invention, a color recognition technology is utilized, so that the tediousness of programming by using an upper computer is avoided when the young children learn programming, the children are more focused, the interestingness is enhanced, the scene of using an electronic screen is avoided, and the eyes of the children can be better protected.