![]() |
Lumino
|
各要素を 0.0~1.0 の範囲で表す RGBA カラーを定義します。 More...
#include <ColorStructs.hpp>
Public Member Functions | |
constexpr | Color () noexcept |
すべての要素を 0.0 で初期化します。 | |
constexpr | Color (float r_, float g_, float b_, float a_=1.0f) noexcept |
各要素を指定して初期化します。 | |
constexpr | Color (float rgb, float a_=1.0f) noexcept |
グレースケール値とアルファ値を指定して初期化します。 | |
constexpr | Color (const Color &other) noexcept |
指定した Color をコピーして初期化します。 | |
constexpr | Color (const Color &color, float a_) noexcept |
指定した Color とアルファ値で初期化します。color のアルファ値は無視され、a_ で指定されたアルファ値を設定します。 | |
constexpr | Color (const Vector4 &vec) noexcept |
指定した Vector4 をコピーして初期化します。x y z w 成分がそれぞれ r g b a 値となります。 | |
constexpr | Color (const Vector3 &vec, float a=1.0f) noexcept |
指定した Vector3 とアルファ値をで初期化します。 x y z 成分がそれぞれ r g b 値となります。 | |
Color (const ColorI &color) noexcept | |
ColorI を変換して初期化します。 | |
void | set (float r_, float g_, float b_, float a_=1.0f) noexcept |
各要素を設定します。 | |
const Vector4 & | toVector4 () const |
Vector4 へ変換します。 | |
Static Public Member Functions | |
static constexpr Color | addClamp (const Color &c1, const Color &c2) noexcept |
2 つの色を加算します。結果を 0.0~1.0 にクランプします。 | |
static constexpr Color | multiplyClamp (const Color &c1, const Color &c2) noexcept |
2 つの色を乗算します。結果を 0.0~1.0 にクランプします。 | |
static constexpr Color | lerp (const Color &c1, const Color &c2, float t) noexcept |
2 つの色を線形補間します。 | |
static Color | parse (const StringRef &str) |
HTML カラー表現の文字列を、Color に変換します。 More... | |
Public Attributes | |
float | r |
赤成分 (0.0~1.0) | |
float | g |
緑成分 (0.0~1.0) | |
float | b |
青成分 (0.0~1.0) | |
float | a |
アルファ成分 (0.0~1.0) | |
Static Public Attributes | |
static const Color | Zero |
#FF0000 (0.0, 0.0, 0.0, 0.0) | |
static const Color | Transparency |
#FF0000 (透明) (0.0, 0.0, 0.0, 0.0) | |
static const Color | TransparencyWhite |
#FF0000 (白透明) (1.0, 1.0, 1.0, 0.0) | |
static const Color | Red |
#FF0000 (1, 0, 0) | |
static const Color | Green |
#00FF00 (0, 1, 0) | |
static const Color | Blue |
#0000FF (0, 0, 1) | |
static const Color | AliceBlue |
#F0F8FF (0.941176, 0.972549, 1) | |
static const Color | AntiqueWhite |
#FAEBD7 (0.980392, 0.921569, 0.843137) | |
static const Color | Aqua |
#00FFFF (0, 1, 1) | |
static const Color | Aquamarine |
#7FFFD4 (0.498039, 1, 0.831373) | |
static const Color | Azure |
#F0FFFF (0.941176, 1, 1) | |
static const Color | Beige |
#F5F5DC (0.960784, 0.960784, 0.862745) | |
static const Color | Bisque |
#FFE4C4 (1, 0.894118, 0.768627) | |
static const Color | Black |
#000000 (0, 0, 0) | |
static const Color | BlanchedAlmond |
#FFEBCD (1, 0.921569, 0.803922) | |
static const Color | BlueViolet |
#8A2BE2 (0.541176, 0.168627, 0.886275) | |
static const Color | Brown |
#A52A2A (0.647059, 0.164706, 0.164706) | |
static const Color | BurlyWood |
#DEB887 (0.870588, 0.721569, 0.529412) | |
static const Color | CadetBlue |
#5F9EA0 (0.372549, 0.619608, 0.627451) | |
static const Color | Chartreuse |
#7FFF00 (0.498039, 1, 0) | |
static const Color | Chocolate |
#D2691E (0.823529, 0.411765, 0.117647) | |
static const Color | Coral |
#FF7F50 (1, 0.498039, 0.313725) | |
static const Color | CornflowerBlue |
#6495ED (0.392157, 0.584314, 0.929412) | |
static const Color | Cornsilk |
#FFF8DC (1, 0.972549, 0.862745) | |
static const Color | Crimson |
#DC143C (0.862745, 0.0784314, 0.235294) | |
static const Color | Cyan |
#00FFFF (0, 1, 1) | |
static const Color | DarkBlue |
#00008B (0, 0, 0.545098) | |
static const Color | DarkCyan |
#008B8B (0, 0.545098, 0.545098) | |
static const Color | DarkGoldenrod |
#B8860B (0.721569, 0.52549, 0.0431373) | |
static const Color | DarkGray |
#A9A9A9 (0.662745, 0.662745, 0.662745) | |
static const Color | DarkGreen |
#006400 (0, 0.392157, 0) | |
static const Color | DarkKhaki |
#BDB76B (0.741176, 0.717647, 0.419608) | |
static const Color | DarkMagenta |
#8B008B (0.545098, 0, 0.545098) | |
static const Color | DarkOliveGreen |
#556B2F (0.333333, 0.419608, 0.184314) | |
static const Color | DarkOrange |
#FF8C00 (1, 0.54902, 0) | |
static const Color | DarkOrchid |
#9932CC (0.6, 0.196078, 0.8) | |
static const Color | DarkRed |
#8B0000 (0.545098, 0, 0) | |
static const Color | DarkSalmon |
#E9967A (0.913725, 0.588235, 0.478431) | |
static const Color | DarkSeaGreen |
#8FBC8F (0.560784, 0.737255, 0.560784) | |
static const Color | DarkSlateBlue |
#483D8B (0.282353, 0.239216, 0.545098) | |
static const Color | DarkSlateGray |
#2F4F4F (0.184314, 0.309804, 0.309804) | |
static const Color | DarkTurquoise |
#00CED1 (0, 0.807843, 0.819608) | |
static const Color | DarkViolet |
#9400D3 (0.580392, 0, 0.827451) | |
static const Color | DeepPink |
#FF1493 (1, 0.0784314, 0.576471) | |
static const Color | DeepSkyBlue |
#00BFFF (0, 0.74902, 1) | |
static const Color | DimGray |
#696969 (0.411765, 0.411765, 0.411765) | |
static const Color | DodgerBlue |
#1E90FF (0.117647, 0.564706, 1) | |
static const Color | Firebrick |
#B22222 (0.698039, 0.133333, 0.133333) | |
static const Color | FloralWhite |
#FFFAF0 (1, 0.980392, 0.941176) | |
static const Color | ForestGreen |
#228B22 (0.133333, 0.545098, 0.133333) | |
static const Color | Fuchsia |
#FF00FF (1, 0, 1) | |
static const Color | Gainsboro |
#DCDCDC (0.862745, 0.862745, 0.862745) | |
static const Color | GhostWhite |
#F8F8FF (0.972549, 0.972549, 1) | |
static const Color | Gold |
#FFD700 (1, 0.843137, 0) | |
static const Color | Goldenrod |
#DAA520 (0.854902, 0.647059, 0.12549) | |
static const Color | Gray |
#808080 (0.5, 0.5, 0.5) | |
static const Color | GreenYellow |
#ADFF2F (0.678431, 1, 0.184314) | |
static const Color | Honeydew |
#F0FFF0 (0.941176, 1, 0.941176) | |
static const Color | HotPink |
#FF69B4 (1, 0.411765, 0.705882) | |
static const Color | IndianRed |
#CD5C5C (0.803922, 0.360784, 0.360784) | |
static const Color | Indigo |
#4B0082 (0.294118, 0, 0.509804) | |
static const Color | Ivory |
#FFFFF0 (1, 1, 0.941176) | |
static const Color | Khaki |
#F0E68C (0.941176, 0.901961, 0.54902) | |
static const Color | Lavender |
#E6E6FA (0.901961, 0.901961, 0.980392) | |
static const Color | LavenderBlush |
#FFF0F5 (1, 0.941176, 0.960784) | |
static const Color | LawnGreen |
#7CFC00 (0.486275, 0.988235, 0) | |
static const Color | LemonChiffon |
#FFFACD (1, 0.980392, 0.803922) | |
static const Color | LightBlue |
#ADD8E6 (0.678431, 0.847059, 0.901961) | |
static const Color | LightCoral |
#F08080 (0.941176, 0.5, 0.5) | |
static const Color | LightCyan |
#E0FFFF (0.878431, 1, 1) | |
static const Color | LightGoldenrodYellow |
#FAFAD2 (0.980392, 0.980392, 0.823529) | |
static const Color | LightGray |
#D3D3D3 (0.827451, 0.827451, 0.827451) | |
static const Color | LightGreen |
#90EE90 (0.564706, 0.933333, 0.564706) | |
static const Color | LightPink |
#FFB6C1 (1, 0.713725, 0.756863) | |
static const Color | LightSalmon |
#FFA07A (1, 0.627451, 0.478431) | |
static const Color | LightSeaGreen |
#20B2AA (0.12549, 0.698039, 0.666667) | |
static const Color | LightSkyBlue |
#87CEFA (0.529412, 0.807843, 0.980392) | |
static const Color | LightSlateGray |
#778899 (0.466667, 0.533333, 0.6) | |
static const Color | LightSteelBlue |
#B0C4DE (0.690196, 0.768627, 0.870588) | |
static const Color | LightYellow |
#FFFFE0 (1, 1, 0.878431) | |
static const Color | Lime |
#00FF00 (0, 1, 0) | |
static const Color | LimeGreen |
#32CD32 (0.196078, 0.803922, 0.196078) | |
static const Color | Linen |
#FAF0E6 (0.980392, 0.941176, 0.901961) | |
static const Color | Magenta |
#FF00FF (1, 0, 1) | |
static const Color | Maroon |
#800000 (0.5, 0, 0) | |
static const Color | MediumAquamarine |
#66CDAA (0.4, 0.803922, 0.666667) | |
static const Color | MediumBlue |
#0000CD (0, 0, 0.803922) | |
static const Color | MediumOrchid |
#BA55D3 (0.729412, 0.333333, 0.827451) | |
static const Color | MediumPurple |
#9370DB (0.576471, 0.439216, 0.858824) | |
static const Color | MediumSeaGreen |
#3CB371 (0.235294, 0.701961, 0.443137) | |
static const Color | MediumSlateBlue |
#7B68EE (0.482353, 0.407843, 0.933333) | |
static const Color | MediumSpringGreen |
#00FA9A (0, 0.980392, 0.603922) | |
static const Color | MediumTurquoise |
#48D1CC (0.282353, 0.819608, 0.8) | |
static const Color | MediumVioletRed |
#C71585 (0.780392, 0.0823529, 0.521569) | |
static const Color | MidnightBlue |
#191970 (0.0980392, 0.0980392, 0.439216) | |
static const Color | MintCream |
#F5FFFA (0.960784, 1, 0.980392) | |
static const Color | MistyRose |
#FFE4E1 (1, 0.894118, 0.882353) | |
static const Color | Moccasin |
#FFE4B5 (1, 0.894118, 0.709804) | |
static const Color | NavajoWhite |
#FFDEAD (1, 0.870588, 0.678431) | |
static const Color | Navy |
#000080 (0, 0, 0.5) | |
static const Color | OldLace |
#FDF5E6 (0.992157, 0.960784, 0.901961) | |
static const Color | Olive |
#808000 (0.5, 0.5, 0) | |
static const Color | OliveDrab |
#6B8E23 (0.419608, 0.556863, 0.137255) | |
static const Color | Orange |
#FFA500 (1, 0.647059, 0) | |
static const Color | OrangeRed |
#FF4500 (1, 0.270588, 0) | |
static const Color | Orchid |
#DA70D6 (0.854902, 0.439216, 0.839216) | |
static const Color | PaleGoldenrod |
#EEE8AA (0.933333, 0.909804, 0.666667) | |
static const Color | PaleGreen |
#98FB98 (0.596078, 0.984314, 0.596078) | |
static const Color | PaleTurquoise |
#AFEEEE (0.686275, 0.933333, 0.933333) | |
static const Color | PaleVioletRed |
#DB7093 (0.858824, 0.439216, 0.576471) | |
static const Color | PapayaWhip |
#FFEFD5 (1, 0.937255, 0.835294) | |
static const Color | PeachPuff |
#FFDAB9 (1, 0.854902, 0.72549) | |
static const Color | Peru |
#CD853F (0.803922, 0.521569, 0.247059) | |
static const Color | Pink |
#FFC0CB (1, 0.752941, 0.796078) | |
static const Color | Plum |
#DDA0DD (0.866667, 0.627451, 0.866667) | |
static const Color | PowderBlue |
#B0E0E6 (0.690196, 0.878431, 0.901961) | |
static const Color | Purple |
#800080 (0.5, 0, 0.5) | |
static const Color | RosyBrown |
#BC8F8F (0.737255, 0.560784, 0.560784) | |
static const Color | RoyalBlue |
#4169E1 (0.254902, 0.411765, 0.882353) | |
static const Color | SaddleBrown |
#8B4513 (0.545098, 0.270588, 0.0745098) | |
static const Color | Salmon |
#FA8072 (0.980392, 0.5, 0.447059) | |
static const Color | SandyBrown |
#F4A460 (0.956863, 0.643137, 0.376471) | |
static const Color | SeaGreen |
#2E8B57 (0.180392, 0.545098, 0.341176) | |
static const Color | SeaShell |
#FFF5EE (1, 0.960784, 0.933333) | |
static const Color | Sienna |
#A0522D (0.627451, 0.321569, 0.176471) | |
static const Color | Silver |
#C0C0C0 (0.752941, 0.752941, 0.752941) | |
static const Color | SkyBlue |
#87CEEB (0.529412, 0.807843, 0.921569) | |
static const Color | SlateBlue |
#6A5ACD (0.415686, 0.352941, 0.803922) | |
static const Color | SlateGray |
#708090 (0.439216, 0.5, 0.564706) | |
static const Color | Snow |
#FFFAFA (1, 0.980392, 0.980392) | |
static const Color | SpringGreen |
#00FF7F (0, 1, 0.498039) | |
static const Color | SteelBlue |
#4682B4 (0.27451, 0.509804, 0.705882) | |
static const Color | Tan |
#D2B48C (0.823529, 0.705882, 0.54902) | |
static const Color | Teal |
#008080 (0, 0.5, 0.5) | |
static const Color | Thistle |
#D8BFD8 (0.847059, 0.74902, 0.847059) | |
static const Color | Tomato |
#FF6347 (1, 0.388235, 0.278431) | |
static const Color | Transparent |
#00FFFFFF (1, 1, 1) | |
static const Color | Turquoise |
#40E0D0 (0.25098, 0.878431, 0.815686) | |
static const Color | Violet |
#EE82EE (0.933333, 0.509804, 0.933333) | |
static const Color | Wheat |
#F5DEB3 (0.960784, 0.870588, 0.701961) | |
static const Color | White |
#FFFFFF (1, 1, 1) | |
static const Color | WhiteSmoke |
#F5F5F5 (0.960784, 0.960784, 0.960784) | |
static const Color | Yellow |
#FFFF00 (1, 1, 0) | |
static const Color | YellowGreen |
#9ACD32 (0.603922, 0.803922, 0.196078) | |
各要素を 0.0~1.0 の範囲で表す RGBA カラーを定義します。
HTML カラー表現の文字列を、Color に変換します。
書式は次の通りです。