16 Color( ) : r(0.f), g(0.f), b(0.f), a(1.f) {}
17 explicit Color(
const float _r,
const float _g,
const float _b,
const float _a= 1.f ) : r(_r), g(_g), b(_b), a(_a) {}
18 explicit Color(
const float _value ) : r(_value), g(_value), b(_value), a(1.f) {}
21 Color(
const Color& color,
const float alpha ) : r(color.r), g(color.g), b(color.b), a(alpha) {}
46Color operator* (
const Color& c,
const float k );
47Color operator* (
const float k,
const Color& c );
49Color operator/ (
const float k,
const Color& c );
50Color operator/ (
const Color& c,
const float k );
51Color operator+ (
const float k,
const Color& c );
52Color operator+ (
const Color& c,
const float k );
Color Red()
utilitaire. renvoie une couleur rouge.
Color Yellow()
utilitaire. renvoie une couleur jaune.
Color Blue()
utilitaire. renvoie une couleur bleue.
Color Black()
utilitaire. renvoie une couleur noire.
Color srgb(const Color &color, const float g=float(2.2))
transformation couleur : rgb lineaire vers srgb
Color Green()
utilitaire. renvoie une couleur verte.
Color White()
utilitaire. renvoie une couleur blanche.
Color linear(const Color &color, const float g=float(2.2))
transformation couleur : srgb vers rgb lineaire
representation d'une couleur (rgba) transparente ou opaque.
Color(const Color &color, const float alpha)
cree une couleur avec les memes composantes que color, mais remplace sa composante alpha (color....
Color()
constructeur par defaut.