⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 color.h

📁 这是一款2d游戏引擎
💻 H
📖 第 1 页 / 共 2 页
字号:

	//: <img src="../images/lemonchiffon-chip.png" width=16 height=16 /> rgb(255, 250, 205).
	static CL_Color lemonchiffon;

	//: <img src="../images/lightblue-chip.png" width=16 height=16 /> rgb(173, 216, 230).
	static CL_Color lightblue;

	//: <img src="../images/lightcoral-chip.png" width=16 height=16 /> rgb(240, 128, 128).
	static CL_Color lightcoral;

	//: <img src="../images/lightcyan-chip.png" width=16 height=16 /> rgb(224, 255, 255).
	static CL_Color lightcyan;

	//: <img src="../images/lightgoldenrodyellow-chip.png" width=16 height=16 /> rgb(250, 250, 210).
	static CL_Color lightgoldenrodyellow;

	//: <img src="../images/lightgray-chip.png" width=16 height=16 /> rgb(211, 211, 211).
	static CL_Color lightgray;

	//: <img src="../images/lightgreen-chip.png" width=16 height=16 /> rgb(144, 238, 144).
	static CL_Color lightgreen;

	//: <img src="../images/lightgrey-chip.png" width=16 height=16 /> rgb(211, 211, 211).
	static CL_Color lightgrey;

	//: <img src="../images/lightpink-chip.png" width=16 height=16 /> rgb(255, 182, 193).
	static CL_Color lightpink;

	//: <img src="../images/lightsalmon-chip.png" width=16 height=16 /> rgb(255, 160, 122).
	static CL_Color lightsalmon;

	//: <img src="../images/lightseagreen-chip.png" width=16 height=16 /> rgb( 32, 178, 170).
	static CL_Color lightseagreen;

	//: <img src="../images/lightskyblue-chip.png" width=16 height=16 /> rgb(135, 206, 250).
	static CL_Color lightskyblue;

	//: <img src="../images/lightslategray-chip.png" width=16 height=16 /> rgb(119, 136, 153).
	static CL_Color lightslategray;

	//: <img src="../images/lightslategrey-chip.png" width=16 height=16 /> rgb(119, 136, 153).
	static CL_Color lightslategrey;

	//: <img src="../images/lightsteelblue-chip.png" width=16 height=16 /> rgb(176, 196, 222).
	static CL_Color lightsteelblue;

	//: <img src="../images/lightyellow-chip.png" width=16 height=16 /> rgb(255, 255, 224).
	static CL_Color lightyellow;

	//: <img src="../images/lime-chip.png" width=16 height=16 /> rgb( 0, 255, 0).
	static CL_Color lime;

	//: <img src="../images/limegreen-chip.png" width=16 height=16 /> rgb( 50, 205, 50).
	static CL_Color limegreen;

	//: <img src="../images/linen-chip.png" width=16 height=16 /> rgb(250, 240, 230).
	static CL_Color linen;

	//: <img src="../images/magenta-chip.png" width=16 height=16 /> rgb(255, 0, 255).
	static CL_Color magenta;

	//: <img src="../images/maroon-chip.png" width=16 height=16 /> rgb(128, 0, 0).
	static CL_Color maroon;

	//: <img src="../images/mediumaquamarine-chip.png" width=16 height=16 /> rgb(102, 205, 170).
	static CL_Color mediumaquamarine;

	//: <img src="../images/mediumblue-chip.png" width=16 height=16 /> rgb( 0, 0, 205).
	static CL_Color mediumblue;

	//: <img src="../images/mediumorchid-chip.png" width=16 height=16 /> rgb(186, 85, 211).
	static CL_Color mediumorchid;

	//: <img src="../images/mediumpurple-chip.png" width=16 height=16 /> rgb(147, 112, 219).
	static CL_Color mediumpurple;

	//: <img src="../images/mediumseagreen-chip.png" width=16 height=16 /> rgb( 60, 179, 113).
	static CL_Color mediumseagreen;

	//: <img src="../images/mediumslateblue-chip.png" width=16 height=16 /> rgb(123, 104, 238).
	static CL_Color mediumslateblue;

	//: <img src="../images/mediumspringgreen-chip.png" width=16 height=16 /> rgb( 0, 250, 154).
	static CL_Color mediumspringgreen;

	//: <img src="../images/mediumturquoise-chip.png" width=16 height=16 /> rgb( 72, 209, 204).
	static CL_Color mediumturquoise;

	//: <img src="../images/mediumvioletred-chip.png" width=16 height=16 /> rgb(199, 21, 133).
	static CL_Color mediumvioletred;

	//: <img src="../images/midnightblue-chip.png" width=16 height=16 /> rgb( 25, 25, 112).
	static CL_Color midnightblue;

	//: <img src="../images/mintcream-chip.png" width=16 height=16 /> rgb(245, 255, 250).
	static CL_Color mintcream;

	//: <img src="../images/mistyrose-chip.png" width=16 height=16 /> rgb(255, 228, 225).
	static CL_Color mistyrose;

	//: <img src="../images/moccasin-chip.png" width=16 height=16 /> rgb(255, 228, 181).
	static CL_Color moccasin;

	//: <img src="../images/navajowhite-chip.png" width=16 height=16 /> rgb(255, 222, 173).
	static CL_Color navajowhite;

	//: <img src="../images/navy-chip.png" width=16 height=16 /> rgb( 0, 0, 128).
	static CL_Color navy;

	//: <img src="../images/oldlace-chip.png" width=16 height=16 /> rgb(253, 245, 230).
	static CL_Color oldlace;

	//: <img src="../images/olive-chip.png" width=16 height=16 /> rgb(128, 128, 0).
	static CL_Color olive;

	//: <img src="../images/olivedrab-chip.png" width=16 height=16 /> rgb(107, 142, 35).
	static CL_Color olivedrab;

	//: <img src="../images/orange-chip.png" width=16 height=16 /> rgb(255, 165, 0).
	static CL_Color orange;

	//: <img src="../images/orangered-chip.png" width=16 height=16 /> rgb(255, 69, 0).
	static CL_Color orangered;

	//: <img src="../images/orchid-chip.png" width=16 height=16 /> rgb(218, 112, 214).
	static CL_Color orchid;

	//: <img src="../images/palegoldenrod-chip.png" width=16 height=16 /> rgb(238, 232, 170).
	static CL_Color palegoldenrod;

	//: <img src="../images/palegreen-chip.png" width=16 height=16 /> rgb(152, 251, 152).
	static CL_Color palegreen;

	//: <img src="../images/paleturquoise-chip.png" width=16 height=16 /> rgb(175, 238, 238).
	static CL_Color paleturquoise;

	//: <img src="../images/palevioletred-chip.png" width=16 height=16 /> rgb(219, 112, 147).
	static CL_Color palevioletred;

	//: <img src="../images/papayawhip-chip.png" width=16 height=16 /> rgb(255, 239, 213).
	static CL_Color papayawhip;

	//: <img src="../images/peachpuff-chip.png" width=16 height=16 /> rgb(255, 218, 185).
	static CL_Color peachpuff;

	//: <img src="../images/peru-chip.png" width=16 height=16 /> rgb(205, 133, 63).
	static CL_Color peru;

	//: <img src="../images/pink-chip.png" width=16 height=16 /> rgb(255, 192, 203).
	static CL_Color pink;

	//: <img src="../images/plum-chip.png" width=16 height=16 /> rgb(221, 160, 221).
	static CL_Color plum;

	//: <img src="../images/powderblue-chip.png" width=16 height=16 /> rgb(176, 224, 230).
	static CL_Color powderblue;

	//: <img src="../images/purple-chip.png" width=16 height=16 /> rgb(128, 0, 128).
	static CL_Color purple;

	//: <img src="../images/red-chip.png" width=16 height=16 /> rgb(255, 0, 0).
	static CL_Color red;

	//: <img src="../images/rosybrown-chip.png" width=16 height=16 /> rgb(188, 143, 143).
	static CL_Color rosybrown;

	//: <img src="../images/royalblue-chip.png" width=16 height=16 /> rgb( 65, 105, 225).
	static CL_Color royalblue;

	//: <img src="../images/saddlebrown-chip.png" width=16 height=16 /> rgb(139, 69, 19).
	static CL_Color saddlebrown;

	//: <img src="../images/salmon-chip.png" width=16 height=16 /> rgb(250, 128, 114).
	static CL_Color salmon;

	//: <img src="../images/sandybrown-chip.png" width=16 height=16 /> rgb(244, 164, 96).
	static CL_Color sandybrown;

	//: <img src="../images/seagreen-chip.png" width=16 height=16 /> rgb( 46, 139, 87).
	static CL_Color seagreen;

	//: <img src="../images/seashell-chip.png" width=16 height=16 /> rgb(255, 245, 238).
	static CL_Color seashell;

	//: <img src="../images/sienna-chip.png" width=16 height=16 /> rgb(160, 82, 45).
	static CL_Color sienna;

	//: <img src="../images/silver-chip.png" width=16 height=16 /> rgb(192, 192, 192).
	static CL_Color silver;

	//: <img src="../images/skyblue-chip.png" width=16 height=16 /> rgb(135, 206, 235).
	static CL_Color skyblue;

	//: <img src="../images/slateblue-chip.png" width=16 height=16 /> rgb(106, 90, 205).
	static CL_Color slateblue;

	//: <img src="../images/slategray-chip.png" width=16 height=16 /> rgb(112, 128, 144).
	static CL_Color slategray;

	//: <img src="../images/slategrey-chip.png" width=16 height=16 /> rgb(112, 128, 144).
	static CL_Color slategrey;

	//: <img src="../images/snow-chip.png" width=16 height=16 /> rgb(255, 250, 250).
	static CL_Color snow;

	//: <img src="../images/springgreen-chip.png" width=16 height=16 /> rgb( 0, 255, 127).
	static CL_Color springgreen;

	//: <img src="../images/steelblue-chip.png" width=16 height=16 /> rgb( 70, 130, 180).
	static CL_Color steelblue;

	//: <img src="../images/tan-chip.png" width=16 height=16 /> rgb(210, 180, 140).
	static CL_Color tan;

	//: <img src="../images/teal-chip.png" width=16 height=16 /> rgb( 0, 128, 128).
	static CL_Color teal;

	//: <img src="../images/thistle-chip.png" width=16 height=16 /> rgb(216, 191, 216).
	static CL_Color thistle;

	//: <img src="../images/tomato-chip.png" width=16 height=16 /> rgb(255, 99, 71).
	static CL_Color tomato;

	//: <img src="../images/turquoise-chip.png" width=16 height=16 /> rgb( 64, 224, 208).
	static CL_Color turquoise;

	//: <img src="../images/violet-chip.png" width=16 height=16 /> rgb(238, 130, 238).
	static CL_Color violet;

	//: <img src="../images/wheat-chip.png" width=16 height=16 /> rgb(245, 222, 179).
	static CL_Color wheat;

	//: <img src="../images/white-chip.png" width=16 height=16 /> rgb(255, 255, 255).
	static CL_Color white;

	//: <img src="../images/whitesmoke-chip.png" width=16 height=16 /> rgb(245, 245, 245).
	static CL_Color whitesmoke;

	//: <img src="../images/yellow-chip.png" width=16 height=16 /> rgb(255, 255, 0).
	static CL_Color yellow;

	//: <img src="../images/yellowgreen-chip.png" width=16 height=16 /> rgb(154, 205, 50).
	static CL_Color yellowgreen;
	
	//: Find and returns the static color matching a string.
	//param name: Name of color to match, eg. "blue".
	//return: Reference to matching static color, or rgba(0,0,0,0) if there was no match.
	static CL_Color &find_color(const std::string &name);
	
	//: Returns the names of static colors defined.
	static std::vector<std::string> &get_names();

//! Operations:
public:
	//: Set alpha color component, in the range 0-255.
	void set_alpha(unsigned int value) { color = (color & 0x00ffffff) + (value << 24); }

	//: Set red color component, in the range 0-255.
	void set_red(unsigned int value) { color = (color & 0xff00ffff) + (value << 16); }

	//: Set green color component, in the range 0-255.
	void set_green(unsigned int value) { color = (color & 0xffff00ff) + (value << 8); }

	//: Set blue color component, in the range 0-255.
	void set_blue(unsigned int value) { color = (color & 0xffffff00) + value; }

	//: Set color based on rgba color components in the range 0-255.
	void set_color(unsigned int red, unsigned int green, unsigned int blue, unsigned int alpha = 255)
	{ color = (alpha<<24) + (red<<16) + (green<<8) + blue; }
};

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -