222 color = preferences.mainColor; |
222 color = preferences.mainColor; |
223 } |
223 } |
224 else if (polygon.color == ldraw::edgeColor) |
224 else if (polygon.color == ldraw::edgeColor) |
225 { |
225 { |
226 // Edge color is black, unless we have a dark background, in which case lines need to be bright. |
226 // Edge color is black, unless we have a dark background, in which case lines need to be bright. |
227 color = Qt::black; //luma(config::backgroundColor()) > 40 ? Qt::black : Qt::white; |
227 color = luma(preferences.backgroundColor) > (40.0 / 256.0) ? Qt::black : Qt::white; |
228 } |
228 } |
229 else |
229 else |
230 { |
230 { |
231 // Not main or edge color, use the polygon's color as is. |
231 // Not main or edge color, use the polygon's color as is. |
232 color = this->colorTable[polygon.color].faceColor; |
232 color = this->colorTable[polygon.color].faceColor; |