YSMENU colors

Discussion in 'DSTT' started by Dr.Norton, Feb 11, 2008.

  1. Dr.Norton
    OP

    Dr.Norton Advanced Member

    Newcomer
    72
    0
    Nov 4, 2006
    Canada
    Ontario
    anyone know how to change the colour settings of the selection menu and such, the red on blue hurts lol
     
  2. dudereno

    dudereno GBAtemp Regular

    Member
    193
    1
    Dec 7, 2005
    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.
     
  3. Rhuarc

    Rhuarc Member

    Newcomer
    34
    0
    Feb 11, 2008
    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.
     
  4. cory1492

    cory1492 GBAtemp Maniac

    Member
    1,490
    21
    Jun 23, 2005
    Canada
    Home, WhereElse?
    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.
     
  5. Bri

    Bri GBAtemp Psycho!

    Member
    3,413
    2
    Dec 25, 2007
    United States
    Wouldn't "BGR" indicate that the order is blue-green-red rather than red-green-blue?

    -Bri
     
  6. Rhuarc

    Rhuarc Member

    Newcomer
    34
    0
    Feb 11, 2008
    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! [​IMG]

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

    mixinluv2u GBAtemp Advanced Fan

    Member
    603
    0
    Jul 20, 2007
    United States
    is a converter to use that changes between the usual 6 digit hex and this format?
     
  8. Bri

    Bri GBAtemp Psycho!

    Member
    3,413
    2
    Dec 25, 2007
    United States
    There is a color picker here that will let you select colors and converts them into the proper format.

    The formula is RGB15 = (((b/8)
     
  9. khan

    khan GBAtemp Maniac

    Member
    1,320
    0
    Mar 17, 2003
    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
     
  10. Fakie!

    Fakie! GBAtemp Regular

    Member
    285
    0
    Mar 23, 2007
    Cote d'Ivoire
    Same here. I get a grayish color

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

    Anubis GBAtemp Fan

    Member
    440
    14
    Dec 5, 2005
    Portugal
    Thanks for the guide, everything works fine.
     
  12. ozzymud

    ozzymud GBAtemp Regular

    Member
    198
    0
    Aug 31, 2008
    United States
    Oregon
  13. thunduaga

    thunduaga Advanced Member

    Newcomer
    54
    0
    Oct 13, 2007
    United States
    EDIT: Sry wrong thred