【问题标题】:How can I figure out what colors I have in this code?我怎样才能弄清楚我在这段代码中有什么颜色?
【发布时间】:2014-04-09 05:08:29
【问题描述】:

我正在开发 TI AM335x EVM。它使用 Arago Linux 发行版。

现在我想修改这个设备的启动画面,它有一个名为psplash的用户空间应用程序,还有一个定义颜色的文件,这是该文件中的代码:

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 

我知道这些是组成 RGB 值的十六进制代码,基于它是 3 组字节的事实,我认为它们可能是 x11 color codes。

我想弄清楚这些到底是什么颜色,例如我在任何地方都找不到0xEC 0xEC 0xE1。我怎样才能弄清楚这些值代表什么颜色?

【问题讨论】:

    标签: colors hex arago


    【解决方案1】:

    数字前的 0x 表示它是用十六进制编写的,因此您只需将十六进制数字转换为十进制即可获得标准的 0-255 rgb 值

    0xec,0xec,0xe1  ->  ec,ec,e1  -> 236,236,225
    0x6d,0x6d,0x70  ->  6d,6d,70  -> 109,109,112
    

    here 是一个很好的十六进制到十进制转换,以防你数学不好

    而here 是值到颜色的转换器,只需将颜色的值放在文本字段中,颜色就会出现

    【讨论】:

      【解决方案2】:

      这些值是十六进制的。 如果我将它们转换为十进制并将它们放入绘图应用程序中,我会得到一种颜色。 举个例子: 0xEC 0xEC 0xE1 -> 236,236,225 -> 我得到浅灰色

      【讨论】:

        猜你喜欢
        • 2023-04-01
        • 1970-01-01
        • 1970-01-01
        • 2011-08-15
        • 1970-01-01
        • 2011-12-19
        • 1970-01-01
        • 2020-11-17
        • 1970-01-01
        相关资源
        最近更新 更多