number colors

nt
Member Posts: 160
hi,
anyone have the relation between the numbers and the colors in navision?
thanks
anyone have the relation between the numbers and the colors in navision?
thanks
0
Comments
-
Look in the online Help
Is it something like
R * (G * 256) * (B*256*256)0 -
where i can find the online help?0
-
nt wrote:where i can find the online help?
Menu ? -> C/SIDE Reference Guide
I have made a codeunit which can get the red, green and / or blue value from the Navision Color value as well as convert RGB to Navision:
http://mbs-support.info/dload.php?actio ... file_id=47
(The page is in german but the codeunit is made with DEU and ENU text constants.)Timo Lässer
Microsoft Dynamics NAV Developer since 1997
MSDynamics.de - German Microsoft Dynamics Community - member of [clip]0 -
nt wrote:hi,
anyone have the relation between the numbers and the colors in navision?
thanks
The format is RGB (Red, Green, Blue)
Get the binary value for each, ie. 255 (dec) = 11111111
So, lets say you had a color 255, 0, 110
255 = 11111111
0 = 00000000
110 = 01101110
Combine the binary values (11111111 00000000 01101110) and convert the value to decimal = 16711790
Hope this makes sence.
PS: You can use Calculater.exe to do this
Charl0 -
RGB Color Model
The system uses the RGB color model for specifying colors. This model specifies the intensity of red, green, and blue on a scale of 0 to 255, with 0 (zero) indicating the minimum intensity. The settings of the three colors are converted to a single integer value by using this formula:
RGB value:= Red + (Green*256) + (Blue*256*256)
Examples:
Red
Green
Blue
RGB value
Color
255
0
0
255
Red
0
255
0
65280
Green
0
0
255
16711680
Blue
0
255
255
16776960
Cyan
255
0
255
16711935
Magenta
255
255
0
65535
Yellow
255
255
255
16777215
White
128
128
128
8421504
Gray
0
0
0
0
Black
To extract the settings of the red, green and blue elements from an RGB value, you can use this method:
Convert the RGB value to a hexadecimal value. This will give you a hexadecimal number with up to six digits. From right to left, each pair of hexadecimal digits is the setting of red, green and blue, respectively, and can be converted back to decimal. (If the hexadecimal number contains less than six digits, fill out the number with zeroes on the left.)
Examples:
RGB
Hex
Red
Blue
Green
6579300
646464
100
100
100
16422450
FA9632
50
150
2500 -
ok guys
thanks0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions