简体   繁体   English

如何找出这段代码中的颜色?

[英]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.

相关问题 如何将WPF按钮的内容设置为具有多种颜色? - How can I set the Content of a WPF Button to have multiple colors? 如何在同一动画中具有不同的背景颜色? - How can I have different background colors in the same animation? 如何从View对象上使用的自定义colors.xml获取颜色十六进制代码? - How can I get the colors hex code from custom colors.xml that I used on a View object? 我有一个颜色数组,我想在 C# 的 for 循环中用标签分配颜色。 我怎么能这样做? - I have an array of colors and I want to assign the colors with the labels in the for loop in C#. How can I do so? 我的班级代码中不推荐使用的API在哪里? 我不知道 - Where is the deprecated API at my class code ? I can't figure out 如何将颜色转换为 MaterialColor,以便在我的应用程序中拥有有限的 colors 调色板? - How I can convert a Color into MaterialColor so I can have a limited Pallete of colors in my App? 在Eclipse中,如何更改自动突出显示颜色? (我做了我的意思截图) - In Eclipse, how can I change the automatic highlighting colors? (I made a Screenshot of what I mean) 无法弄清楚如何在visual studio中更改我的滚动条颜色 - Can't figure out how to change my scrollbar colors in visual studio 无法弄清楚如何编码这种映射情感和颜色 - can't figure out how to code this mapping emotion and color 我怎样才能使颜色均匀,以便在任何给定的色调和明暗度下都可以读取文字? - How can I even out colors so text is readable against them at any given hue and lightness?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM