45 if (color_string.indexOf(
';') != -1)
47 QStringList strings = color_string.split(
';');
48 if (strings.size() >= 3)
51 int r = strings[0].toInt(&r_ok);
53 int g = strings[1].toInt(&g_ok);
55 int b = strings[2].toInt(&b_ok);
56 if (r_ok && g_ok && b_ok)
65 if (QColor::colorNames().contains(color_string, Qt::CaseInsensitive) ||
66 (color_string.size() > 0 && color_string[0] ==
'#'))
68 new_color.setNamedColor(color_string.toLower());
75 return QString(
"%1; %2; %3").arg(color.red()).arg(color.green()).arg(color.blue());
80 return QColor::fromRgbF(c.r, c.g, c.b, c.a);
85 return Ogre::ColourValue(c.redF(), c.greenF(), c.blueF(), c.alphaF());