How can I figure out what colors I have in this code?

590 Views Asked by At

I'm working on a TI AM335x EVM. It uses the Arago Linux distribution.

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-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.

What I'm trying to figure out is exactly what colors these are, for example I can't find 0xEC 0xEC 0xE1 anywhere. How can I figure out what colors these values represent?

2

There are 2 best solutions below

0
On

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

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

0
On

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