Forum Stats

  • 3,733,845 Users
  • 2,246,829 Discussions
  • 7,856,892 Comments

Discussions

Oracle Forms RGB color looks differently in Java

User_3DXTV
User_3DXTV Member Posts: 2 Green Ribbon

Hello everybody

We are currently migrating Oracle Forms 11g application to Java.

When I open the form in Forms Builder the background color used for a Canvas is R100G88b75 however when I am entering this color code here https://www.rapidtables.com/convert/color/rgb-to-hsv.html the color preview looks completely different. The same color as on this page I can see in the Java application ( RGB hex code #64584B)

CSS file

. Clock {

font-family: "MS Sans Serif" ;

font-size: 8pt;

color: #000000 ;

background-color: #64584B;

   }

Just wondeering why the colors look differently.

I would appreciate if anybody can help with this.

Thank you in advance

Tagged:

Best Answer

  • Michael Ferrante-Oracle
    Michael Ferrante-Oracle Senior Principal Product Manager USMember Posts: 6,627 Employee
    Accepted Answer

    In the Builder, RGB settings are measured 0-100 (percent). Whereas at runtime (in PLSQL) they are measured 0-255). The tool you are using assumes 0-255, which you would have to convert to a percentage. It might just be easier to put the color settings in code, for example in the WHEN-NEW-FORM-INSTANCE trigger.

    SET_CANVAS_PROPERTY ('CANVAS2', BACKGROUND_COLOR, 'r100g88b74');

Answers

  • Michael Ferrante-Oracle
    Michael Ferrante-Oracle Senior Principal Product Manager USMember Posts: 6,627 Employee
    Accepted Answer

    In the Builder, RGB settings are measured 0-100 (percent). Whereas at runtime (in PLSQL) they are measured 0-255). The tool you are using assumes 0-255, which you would have to convert to a percentage. It might just be easier to put the color settings in code, for example in the WHEN-NEW-FORM-INSTANCE trigger.

    SET_CANVAS_PROPERTY ('CANVAS2', BACKGROUND_COLOR, 'r100g88b74');

  • User_3DXTV
    User_3DXTV Member Posts: 2 Green Ribbon

    Perfect ,thank you very much Michael! Just couldn't find this in the documentation.

Sign In or Register to comment.