diff --git a/config.cpp b/config.cpp index 77e59f1a..a942d42a 100644 --- a/config.cpp +++ b/config.cpp @@ -3295,6 +3295,7 @@ EX int config3 = addHook(hooks_configfile, 100, [] { }); param_ccolor(ccolor::which, "pattern"); + param_str(ccolor::color_formula, "color_formula"); }); EX void switchcolor(unsigned int& c, unsigned int* cs) { diff --git a/pattern2.cpp b/pattern2.cpp index c25eed6d..eba9ac70 100644 --- a/pattern2.cpp +++ b/pattern2.cpp @@ -1672,7 +1672,10 @@ EX namespace ccolor { EX string color_formula = "rgb(to01(x),to01(y),to01(z))"; EX data formula = data("formula", always_available, CCO { - return patterns::compute_map_function(c, color_formula); + color_t col = patterns::compute_map_function(c, color_formula); + bool wall = (col & 0xFF); + col >>= 8; if(wall) col |= 0x1000000; + return col; }, {}); EX data threecolor = data("threecolor", [] { return geosupport_threecolor(); }, CCO {