Skip to content

Instantly share code, notes, and snippets.

@brokenpylons
Last active March 20, 2019 11:56
Show Gist options
  • Save brokenpylons/9f3176fa499333802ca2b068367539ea to your computer and use it in GitHub Desktop.
Save brokenpylons/9f3176fa499333802ca2b068367539ea to your computer and use it in GitHub Desktop.

Naloga

Color

-r
-g
-b

Color(r, g, b)
+getR()
+getG()
+getB()
+toString()

Primer uporabe:

Color red(255, 0, 0);
std::cout << red.toString() << std::endl;

Izhod:

(255, 0, 0)

Želeli bi tudi v naprej namešane barve:

Color color = Color::Red;
std::cout << color.toString() << std::endl;

Izhod:

(255, 0, 0)

Pripravite barve: Red, Green, Blue, Yellow, Magenta, Cyan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment