Discussion Board

Results 1 to 5 of 5
  1. #1
    Hi,
    i am trying to get the RGB values of Display.COLOR_BACKGROUND or Display.COLOR_FOREGROUND. Is there a way i can obtain the values. When i use System.out i get the values as color0 and color1 but is there way i can get the RGB values.
    Thanks and Regards,
    Abhijeeth

  2. #2
    Registered User P_ps's Avatar
    Join Date
    Oct 2010
    Posts
    6
    You are getting only color specifiers (Display.COLOR_BACKGROUND).

    Probably you want to use Display.getColor(Display.COLOR_BACKGROUND).

    Br.
    P.

  3. #3
    It just return as 2 for highlighted background and 1 for background color.

  4. #4
    Registered User P_ps's Avatar
    Join Date
    Oct 2010
    Posts
    6
    Well, it is working for me - at least I tried this on emulator (S40 6th ed FP1).

    I tried this code:
    Code:
    Display display = Display.getDisplay(midlet);
    System.out.println("background: " + display.getColor(Display.COLOR_BACKGROUND));
    System.out.println("border: " + display.getColor(Display.COLOR_BORDER));
    System.out.println("foreground: " + display.getColor(Display.COLOR_FOREGROUND));
    System.out.println("highlighted background: " + display.getColor(Display.COLOR_HIGHLIGHTED_BACKGROUND));
    System.out.println("highlighted border: " + display.getColor(Display.COLOR_HIGHLIGHTED_BORDER));
    System.out.println("highlighted foreground: " + display.getColor(Display.COLOR_HIGHLIGHTED_FOREGROUND));
    and the result is:
    Code:
    background: 16777215
    border: 16777215
    foreground: 0
    highlighted background: 9291505
    highlighted border: 9291505
    highlighted foreground: 16777215

  5. #5
    Ok thanks let me verify it on that emulator ;-)

Similar Threads

  1. Color display simulator
    By pundkarnilesh in forum Browsing and Mark-ups
    Replies: 0
    Last Post: 2010-02-19, 06:21
  2. 7600??? 65000 color display...
    By manjax in forum Mobile Java General
    Replies: 0
    Last Post: 2005-06-29, 02:44
  3. Color image display compatibility on all mobiles!
    By SKIL in forum Browsing and Mark-ups
    Replies: 2
    Last Post: 2004-09-28, 07:16
  4. Display 24bit bitmap in 3650, ugly color...
    By yfho in forum Symbian C++
    Replies: 2
    Last Post: 2003-08-07, 12:58
  5. Palette of the Nokia color display - please answer
    By zevelev in forum Mobile Web Site Development
    Replies: 1
    Last Post: 2003-02-17, 14:36

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved