#include <CeresEngine/Math/Color.hpp>
|
| static const TColor | zero {0, 0, 0, 0} |
| |
| static const TColor | white {1, 1, 1, 1} |
| |
| static const TColor | black {0, 0, 0, 1} |
| |
| static const TColor | red {1, 0, 0, 1} |
| |
| static const TColor | green {0, 1, 0, 1} |
| |
| static const TColor | blue {0, 0, 1, 1} |
| |
◆ TColor() [1/5]
template<typename T >
|
|
inlineexplicitconstexprnoexcept |
◆ TColor() [2/5]
template<typename T >
|
|
inlineexplicitconstexprnoexcept |
◆ TColor() [3/5]
template<typename T >
| constexpr Math::TColor< T >::TColor |
( |
T |
red, |
|
|
T |
green, |
|
|
T |
blue, |
|
|
T |
alpha = 1.0 |
|
) |
| |
|
inlineexplicitconstexprnoexcept |
◆ TColor() [4/5]
◆ TColor() [5/5]
template<typename T >
template<typename U >
|
|
inlineexplicitconstexprnoexcept |
◆ changeAlpha()
Sets the alpha channel of a color to a new value.
◆ changeBlue()
Sets the blue channel of a color to a new value.
◆ changeGreen()
Sets the green channel of a color to a new value.
◆ changeRed()
Sets the red channel of a color to a new value.
◆ darken()
Makes the color darker.
The amount must be a number between 0.0 and 1.0 (inclusive). Decreases the HSL lightness of the color by that amount.
- Note
- The
darken() function decreases lightness by a fixed amount, which is often not the desired effect. To make a color a certain percentage darker than it was before, use scale() instead.
◆ fromString()
◆ invert()
template<typename T >
| constexpr TColor Math::TColor< T >::invert |
( |
T |
amount = 0.0, |
|
|
bool |
applyOnAlpha = false |
|
) |
| const |
|
inlineconstexprnoexcept |
Inverts the color value.
The passed parameter defines the proportion of the conversion. A value of 0.0 is completely inverted. A value of 0.0 leaves the input unchanged. Values between 0% and 100% are linear multipliers on the effect. Values of amount over 100% are allowed but the value will be clamped to 1.0.
- Note
- Negative values are not allowed.
◆ opacity()
Applies transparency to the color.
The passed parameter defines the proportion of the conversion. A value of 0.0 is completely transparent. A value of 1.0 leaves the input unchanged. Values between 0.0 and 1.0 are linear multipliers on the effect. Values of amount over 1.0 are allowed but will be clamped to 1.
- Note
- Negative values are not allowed.
◆ operator TVector4< T >()
◆ operator!=()
◆ operator*() [1/2]
◆ operator*() [2/2]
◆ operator*=() [1/2]
◆ operator*=() [2/2]
◆ operator+()
◆ operator+=() [1/2]
◆ operator+=() [2/2]
◆ operator-()
◆ operator-=() [1/2]
◆ operator-=() [2/2]
◆ operator/() [1/2]
◆ operator/() [2/2]
◆ operator/=() [1/2]
◆ operator/=() [2/2]
◆ operator=()
◆ operator==()
◆ saturate()
Saturates the color.
The passed parameter defines the proportion of the conversion. A value of 0.0 is completely un-saturated. A value of 1.0 leaves the input unchanged. Other values are linear multipliers on the effect. Values of amount over 1.0 are allowed, providing super-saturated results.
- Note
- Negative values are not allowed.
◆ toHSL()
◆ toRGB()
◆ operator*
template<typename T >
| constexpr TColor operator* |
( |
T |
lhs, |
|
|
const TColor< T > & |
rhs |
|
) |
| |
|
friend |
◆ black
◆ blue
◆ green
◆ red
◆ white
◆ zero
The documentation for this class was generated from the following file:
- /Users/Rogiel/Developer/CeresEngine/Engine/Sources/CeresEngine/Math/Color.hpp