Compared with manual matching, computer colour matching is faster and more reliable. Computer colour‐matching results are determined by the method used; however, in practical application, the accuracy of colour matching still needs to be improved. In this paper, we first designed a series of colour‐matching schemes with two reactive dyes, Levafix Blue and Levafix Amber, then dyed cotton fabric through the pad‐dry‐pad‐steam process, and finally established the matching database. Furthermore, two colour‐matching sub‐models were developed by least squares support vector machine (LSSVM) to predict the dye recipe in cotton fabric dyeing, while particle swarm optimisation (PSO) was applied to optimise and tune the parameters of the LSSVM models. Herein, the model inputs are the colour parameters L*, a* and b* of the dyed samples and the model output is dye concentration. It is confirmed that the colour‐matching models have excellent evaluation indexes and colour‐matching effects. The coefficient of determination is more than 0.99, and the colour‐matching precision is more than 98%. All the results prove that the colour‐matching models by PSO‐LSSVM can be accurately applied in practical dyeing to predict the reactive dye recipe, which is suitable for use on an industrial scale.