Quantcast
Channel: MicroStation Programming Forum - Recent Threads
Viewing all articles
Browse latest Browse all 7260

RE: [v8i add ins NET] convert rgb to internal long value

$
0
0

[quote user="Nenad Poljcic"]How do I convert RGB values to internal microstation rgb index ( 0 to 254 ) [/quote]

From VBA help...

InternalColorFromRGBColor

This retrieves a number that contains 2 indices. The least significant byte is an index of the closest matching color in the color table. The remainder of the value is an index into the model's table of RGB values.

A program can use a value returned from InternalColorFromRGBColor to set an element's color

There's an example in help as well.

What's possibly confusing your analysis is the structure of that Long.  As well as the RGB value there's an 8-bit index into MicroStation's colour table.  In other words, all 32-bits of the Long are used.


Viewing all articles
Browse latest Browse all 7260

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>