Can less define the use of multiple variables

in the A.less file, another B.lesson is introduced, and in B, something like this is defined:

@import "./B.less";
.common(green);
.common(red);

.common(@color) {
    .common{
        color: @color;
    }
    

this is generally the way to set font colors, but what if I want to match the corresponding color configuration in A based on @ color?
wants to pass the value of @ color to the variable defined in A to use the corresponding color. I tried @ {{color}}-font-color, without success. How to write it

May.14,2021
Menu