I'd think, for speed and readability, I'd just use a function with select case.
Just as fast as the IF...ELSEIF... version. Uses almost the same amount of coding as the qbjs version does to define the dictionary, and is just as easily readable.
Code: (Select All)
FUNCTION colors~& (mycolor$)
SELECT CASE LCASE$(mycolor$)
CASE "brick red": colors = &HFFC62D42
CASE "electric lime": colors = &HFFCCFF00
CASE "metallic sunburst": colors = &HFF9C7C38
END SELECT
END FUNCTION
Just as fast as the IF...ELSEIF... version. Uses almost the same amount of coding as the qbjs version does to define the dictionary, and is just as easily readable.