Visual programming language is a crucial part of learning programming. On this basis, it is essential to use visual programming to lower the learning threshold for students to learn about artificial intelligence (AI) to meet current demands in higher education. Therefore, a 3-h AI course with an RGB-to-HSL learning task was implemented; the results of which were used to analyze university students from two different disciplines. Valid data were collected for 65 students (55 men, 10 women) in the Science (Sci)-student group and 39 students (20 men, 19 women) in the Humanities (Hum)-student group. Independent sample t-tests were conducted to analyze the difference between cognitive styles and computational thinking. No significant differences in either cognitive style or computational thinking ability were found after the AI course, indicating that taking visual AI courses lowers the learning threshold for students and makes it possible for them to take more difficult AI courses, which in turn effectively helping them acquire AI knowledge, which is crucial for cultivating talent in the field of AI.