MCPcopy Create free account
hub / github.com/abreheret/PixelAnnotationTool / invColor

Function invColor

src/utils.cpp:61–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59
60}
61QColor invColor(const QColor& color) {
62 int h, s, v;
63 color.getHsv(&h, &s, &v);
64 h = (h + 180) % 360;
65 s = 255 - s;
66 v = 255 - v;
67 QColor color_inv;
68 color_inv.setHsv(h, s, v);
69 return color_inv;
70}
71
72int rgbToInt(uchar r, uchar g, uchar b) {
73 return (r<<16) + (g<<8) + b;

Callers 1

paintEventMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected