Explanation
This formula relies on a technique called "nested IFs" to handle a series of options and results. With nested IFs, one IF function is nested inside another, a process that is explained in some detail here.
The formula in this example is purposely more verbose than necessary to "show" all possible options and results in a way that is easier to understand and maintain. The trick is to structure the formula with line breaks to show each IF on a separate line along with the "true result" for that IF. The "false result" is the following IF statement. Notice the final false result will "catch" any case that fails all previous tests.
Essentially, we are using line breaks to build a "table" that the human eye can easily read. In addition, we are using the AND function to run more than one logical test at a time to limit the number of IF functions. The AND function inside each IF function tests both color and value.
Note you can use Alt + Enter to enter new lines in the formula bar. You'll need to expand the formula bar vertically to see more than one line at a time.
More conditions
This formula approach can be expanded to evaluate more options. The AND function can handle more logical tests, and you can combine the AND function with the OR function if needed. You could also replace AND and OR with boolean logic. Finally, you can also use the IFS function in later versions of Excel to reduce nesting.
Result as calculation
Although the example above shows a numeric result for each set of options, the formula can be customized to run a calculation instead by replacing hardcoded values with any standard formula expression.