Hacking YSMENU colors

dudereno

Well-Known Member
Member
Joined
Dec 7, 2005
Messages
198
Trophies
0
XP
295
Country
United States
The Latest YSMENU0802110230 version has the following settings in the new .ini file.

Code:
[SKIN]
; COLOR = BIT15 | BGR(5bit x3)
COLOR_TEXT1=0x8000
COLOR_TEXT1F=0x800F
COLOR_TEXT2=0x8000
COLOR_SELECT=0xFC00
COLOR_SELTEXT=0x801F

I guess you need the right hex code to change the text colours.
 

Rhuarc

Active Member
Newcomer
Joined
Feb 11, 2008
Messages
34
Trophies
0
XP
47
Country
United States
I'm looking for answers to this too. I'm assuming that this line "; COLOR = BIT15 | BGR(5bit x3)" is explaining what those codes mean, but I've tried searching around and I see no way to translate that into a real color.

I'm trying to use some other skins with YSMenu, but without change the text colors, etc. it looks really bad.

One thing I thought this might be is a color code in a programming language. I don't know though.

If anyone has any idea how to change these colors I would GREATLY appreciate it!

Thanks!

Edit: Well, I did some more research, and I found out that the 0x before the hex digits means that what follows is going to be in hex. The main issue I have is that most hex colors have 6 digits (3 pairs) and these only have 4 digits (2 pairs). I tried using colors that would have NULL (00) as either the first set or last set, but none of the stuff I have tried comes out with consistent results that I would expect. Kind of at a loss as to where to try next. I emailed the developer, we will see if and when I get a response back.
 

cory1492

Well-Known Member
Member
Joined
Jun 23, 2005
Messages
1,497
Trophies
1
Location
Home, WhereElse?
XP
334
Country
Canada
Bits... DS uses 15 bits to represent an onscreen color, and one bit for alpha.

example:
COLOR_SELTEXT=0x801F
(in binary or bits, conversion can be done by windows calc)
0x801F = 1000000000011111
or, (0,0,31) with alpha bit set.

The first bit (purple) must be set to 1, or the color will not display at all. Then next 5 bits denote red, then 5 for green and 5 for blue. Another way of looking at it is each 5 bit section is a decimal number between 0 and 31. There are some PC side color pickers out there for people to use, IIRC they are more related to programming but would be useful if Yasu never enters an actual conversion for it.
 

Rhuarc

Active Member
Newcomer
Joined
Feb 11, 2008
Messages
34
Trophies
0
XP
47
Country
United States
Wow, looks complicated. I'll dig into it once I get back from the cruise my wife and I are going on this next week!
biggrin.gif


Edit: Ok, so the 1st bit (purple you said) is the alpha bit, which always needs to be 1. then for the 5 binary bits for each color, is that the binary of the color in values between 0 and 31? Hmm, I've never seen the color values go between 0 and 31, most of the time you see it between 0 and 255. I'll have to try to find a color picker that only goes to 31.

Edit2: Ok, I think I'm on to something:

Code:
The number 99D1CA represents a sort of nice sea-green. Looking at the hex, you can see that the red channel, the first two digits, is at a bit more than half intensity (zero intensity being 00 and full intensity being FF, and half intensity being 7F). So the first five-bit part of your number for Nova needs to be somewhat higher than half of its possible value. The highest possible five-bit value is 11111, which equals 31 (which you can figure using BH), so your red value should be approximately 18. 18=10010, so there's your first five bits. The green channel has a value of D1, which is a little more than 75% of its maximum value. 75% of 31 is 24, so your green channel should be about 26. 26=11010, so there's your second group. The blue channel is CA, which is only a bit less than D1, roughly speaking. So the third group should be approximately 21 or 22. 21=10101.

So I found this. So here is what I did to convert a color into the 15 bit binary:

1) Find a color I like in Hex (will need the normal RGB values by converting the Hex or using a color chooser) In my case I went with CC0010 which is a nice reddish maroon. The values for that are R=204, G=0, B=16.

2) We need to convert these RGB values into a 0 to 31 scale. So:
204/255 = .8*31 = 24.8

3) This needs to be converted to binary now. I just used the Windows calculator and come up with 11000. So in this case the closest that you can come to CC (or 204) in binary is 11000. It isn't going to be exact, but it is the closest I think you could get.

4) So now we do that for both G and B. We then come upw ith the following binary values:

R = 11000
G = 00000
B = 00001

5) Then we know that the format of the binary for the colors in YSMenu are ABBBBBGGGGGRRRRR (where A is the alpha channel, needs to be 1). So we combine all those binary values in that order and end up with: 1000010000011000.

6) This needs to be converted to hex now, again using the windows calculator. You get 8418. So to get that maroon color, or as close to it as we can we would enter 0x8418.

I just tested it out and confirmed that using this mehtod does indeed work! It is a pain in the ass, but it works! LoL
 

khan

Well-Known Member
Member
Joined
Mar 17, 2003
Messages
1,320
Trophies
0
Age
53
Website
Visit site
XP
355
Country
Pakistan
What's wrong with YSMenu? it is not recongising my custom colours.

BTW, i am using the latest release (2008/03/20 01:15) and colours I am trying are the followings:


[FILELIST]
; COLOR = BIT15 | BGR(5bit x3)
COLOR_PATH=0x6300
COLOR_FILE=0x7ff8
COLOR_FOLDER=0x7ff0
COLOR_SELECT=0x6300
COLOR_SELTEXT=0x7fff

[FILEINFO]
COLOR_TEXT=0x6300
 

Fakie!

Well-Known Member
Member
Joined
Mar 23, 2007
Messages
285
Trophies
0
Website
Visit site
XP
119
Country
Cote d'Ivoire
khan said:
What's wrong with YSMenu? it is not recongising my custom colours.

BTW, i am using the latest release (2008/03/20 01:15) and colours I am trying are the followings:


[FILELIST]
; COLOR = BIT15 | BGR(5bit x3)
COLOR_PATH=0x6300
COLOR_FILE=0x7ff8
COLOR_FOLDER=0x7ff0
COLOR_SELECT=0x6300
COLOR_SELTEXT=0x7fff

[FILEINFO]
COLOR_TEXT=0x6300

Same here. I get a grayish color

EDIT: There's a new version of YSMenu. Maybe this update fixes the problem.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    SylverReZ @ SylverReZ: You too