summaryrefslogtreecommitdiff
path: root/src/color.cc
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2012-01-25 20:13:03 (GMT)
committerMarius Kintel <marius@kintel.net>2012-01-25 20:13:03 (GMT)
commit4cbdbf9827d2576f8672a6c167261b4b27682920 (patch)
treeb9d413ac635585ceb3abc53b83a48d66ac5e20f3 /src/color.cc
parented02aa85ef0ec0a1adc9aa34f6e1a9f7715a4704 (diff)
Ported remaining color handling away from Qt
Diffstat (limited to 'src/color.cc')
-rw-r--r--src/color.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/color.cc b/src/color.cc
index 1d3eb3e..e458bfb 100644
--- a/src/color.cc
+++ b/src/color.cc
@@ -43,7 +43,7 @@ public:
virtual AbstractNode *evaluate(const Context *ctx, const ModuleInstantiation *inst) const;
private:
- static boost::unordered_map<std::string, Vector3f> colormap;
+ static boost::unordered_map<std::string, Color4f> colormap;
};
#include "colormap.h"
@@ -69,12 +69,12 @@ AbstractNode *ColorModule::evaluate(const Context *ctx, const ModuleInstantiatio
} else if (v.type == Value::STRING) {
std::string colorname = v.text;
boost::algorithm::to_lower(colorname);
- Vector3f color;
+ Color4f color;
if (colormap.find(colorname) != colormap.end()) {
color = colormap[colorname];
- node->color[0] = color[0]/255;
- node->color[1] = color[1]/255;
- node->color[2] = color[2]/255;
+ node->color[0] = color[0];
+ node->color[1] = color[1];
+ node->color[2] = color[2];
} else {
PRINTB_NOCACHE("WARNING: Color name \"%s\" unknown. Please see", colorname);
PRINT_NOCACHE("WARNING: http://en.wikipedia.org/wiki/Web_colors");
contact: Jan Huwald // Impressum