[英]How can I figure out what colors I have in this code?
I'm working on a TI AM335x EVM. 我正在开发TI AM335x EVM。 It uses the Arago Linux distribution. 它使用Arago Linux发行版。
Now I want to modify the splash screen for this device, it has a user space application called psplash , and there is a file which defines colors, here's the code in that file: 现在,我想修改此设备的启动屏幕,它有一个名为psplash的用户空间应用程序,并且有一个定义颜色的文件,这是该文件中的代码:
psplash-colors.h: psplash-colors.h:
/* This is the overall background color */
#define PSPLASH_BACKGROUND_COLOR 0xec,0xec,0xe1
/* This is the color of any text output */
#define PSPLASH_TEXT_COLOR 0x6d,0x6d,0x70
/* This is the color of the progress bar indicator */
#define PSPLASH_BAR_COLOR 0x6d,0x6d,0x70
/* This is the color of the progress bar background */
#define PSPLASH_BAR_BACKGROUND_COLOR 0xec,0xec,0xe1
I get these are hex codes making up RGB values, and based on the fact it's 3 sets of bytes I thought they might have been x11 color codes . 我得到的是组成RGB值的十六进制代码,并且基于这是3个字节的事实,我认为它们可能是x11颜色代码 。
What I'm trying to figure out is exactly what colors these are, for example I can't find 0xEC 0xEC 0xE1
anywhere. 我要弄清楚的是这些颜色到底是什么颜色,例如,我在任何地方都找不到0xEC 0xEC 0xE1
。 How can I figure out what colors these values represent? 如何确定这些值代表什么颜色?
0x before a number means that it is written in hexadecimal , so you just convert the hex number to decimal and you get the standard 0-255 rgb values 数字前的0x表示该数字以十六进制表示,因此您只需将十六进制数字转换为十进制即可获得标准的0-255 rgb值
0xec,0xec,0xe1 -> ec,ec,e1 -> 236,236,225
0x6d,0x6d,0x70 -> 6d,6d,70 -> 109,109,112
here is a nice hex to decimal converted ,in case you are not good in math 这是一个很好的十六进制到十进制的转换,以防你数学不好
and here is value to color converter ,just put the value of the color in the textfield and the color should appear 这是颜色转换器的值,只需将颜色的值放在文本字段中,颜色便会出现
These values are in hexadecimal. 这些值以十六进制表示。 If i convert them to decimal and put them in a drawing application i get a color. 如果我将它们转换为十进制并将它们放在绘图应用程序中,我会得到一种颜色。 for exemple: 0xEC 0xEC 0xE1 -> 236,236,225 -> I get a light grey 例如:0xEC 0xEC 0xE1-> 236,236,225->我得到了浅灰色
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.